@payloadcms/storage-uploadthing
TypeScript icon, indicating that this package has built-in type declarations

3.36.1 • Public • Published

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 an upload type.
  • Get an API key from Uploadthing and set it as apiKey in the options object.
  • acl is optional and defaults to public-read.
  • When deploying to Vercel, server uploads are limited with 4.5MB. Set clientUploads to true to do uploads directly on the client.
export default buildConfig({
  collections: [Media],
  plugins: [
    uploadthingStorage({
      collections: {
        media: true,
      },
      options: {
        token: process.env.UPLOADTHING_TOKEN,
        acl: 'public-read',
      },
    }),
  ],
})

Readme

Keywords

none

Package Sidebar

Install

npm i @payloadcms/storage-uploadthing

Weekly Downloads

1,677

Version

3.36.1

License

MIT

Unpacked Size

51.1 kB

Total Files

39

Last publish

Collaborators

  • payloadjs
  • german.jablo
  • elliotpayload
  • danribbens
  • seanpayload
  • jmikrut
  • jacobsfletch
  • alessiogr
  • patrikkozak