Uploadthing Storage for Payload (beta)
This package provides a way to use uploadthing with Payload.
Installation
pnpm add @payloadcms/storage-uploadthing
Usage
- Configure the
collectionsobject to specify which collections should use uploadthing. The slug must match one of your existing collection slugs and be anuploadtype. - Get an API key from Uploadthing and set it as
apiKeyin theoptionsobject. aclis optional and defaults topublic-read.
export default buildConfig({
collections: [Media],
plugins: [
uploadthingStorage({
collections: {
media: true,
},
options: {
token: process.env.UPLOADTHING_TOKEN,
acl: 'public-read',
},
}),
],
})