I have Payload CMS hosted on Render, and am currently using Uploadthing for images. In the admin UI, when I upload an image, the plugin works. The image shows up on Uploadthing.
However, the admin ui images reference local urls.
Payload and plugins are synced to 3.46.0
My config is below. I think it's right because my images show up on uploadthing. I'm also seeing the uploadthing image keys in the API response.
uploadthingStorage({
collections: {
media: true,
},
options: {
token: process.env.UPLOADTHING_TOKEN,
acl: 'public-read',
},
}),
],```
here is my collection:
import type { CollectionConfig } from 'payload'
export const Media: CollectionConfig = {
slug: 'media',
upload: true,
access: {
read: () => true,
},
fields: [
{
name: 'alt',
type: 'text'
},
],
}```
adding this: disableLocalStorage: true doesn't fix it. I still see local urls.
I also tried adding this in the upload object in the media collection config:
adminThumbnail: ({ doc }) => doc?._key ? `https://ixjni1odz7.ufs.sh/f/${doc._key}` : '',