@payloadcms/storage-uploadthing
v3.0.2
Published
Payload storage adapter for uploadthing
Downloads
3,595
Maintainers
Keywords
Readme
Uploadthing Storage for Payload (beta)
This package provides a way to use uploadthing with Payload.
Installation
pnpm add @payloadcms/storage-uploadthing
Usage
- 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: {
media: true,
},
options: {
token: process.env.UPLOADTHING_TOKEN,
acl: 'public-read',
},
}),
],
})