This package provides a way to use uploadthing with Payload.
pnpm add @paylaodcms/storage-uploadthing
- Configure the
collections
object to specify which collections should use uploadthing. The slug must match one of your existing collection slugs and be anupload
type. - Get an API key from Uploadthing and set it as
apiKey
in theoptions
object. -
acl
is optional and defaults topublic-read
.
export default buildConfig({
collections: [Media],
plugins: [
uploadthingStorage({
collections: {
[mediaSlug]: true,
},
options: {
apiKey: process.env.UPLOADTHING_SECRET,
acl: 'public-read',
},
}),
],
})