**BREAKING**: - This bumps the minimum required node version from node 20.6.0 to node 20.9.0. This is because 20.6.0 breaks type generation due to a CJS node bug, and 20.9.0 is the next v20 LTS version. The minimum node 18 version stays the same (18.20.2)
Uploadthing Storage for Payload (beta)
This package provides a way to use uploadthing with Payload.
Installation
pnpm add @paylaodcms/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: {
[mediaSlug]: true,
},
options: {
apiKey: process.env.UPLOADTHING_SECRET,
acl: 'public-read',
},
}),
],
})