feat(storage-uploadthing)!: upgrade to v7 (#8346)

Upgrade uploadthing to v7

The `options` that can be passed to the plugin now mirror the
`UTApiOptions` of v7.

The most notable change is to pass `token` with
`process.env.UPLOADTHING_TOKEN` instead of `apiKey` with
`process.env.UPLOADTHING_SECRET`.

```diff
options: {
- apiKey: process.env.UPLOADTHING_SECRET,
+ token: process.env.UPLOADTHING_TOKEN,
  acl: 'public-read',
},
This commit is contained in:
Elliot DeNolf
2024-11-13 16:27:02 -05:00
committed by GitHub
parent afd69c4d54
commit 4690cd819a
6 changed files with 312 additions and 120 deletions

View File

@@ -23,7 +23,7 @@ export default buildConfig({
[mediaSlug]: true,
},
options: {
apiKey: process.env.UPLOADTHING_SECRET,
token: process.env.UPLOADTHING_TOKEN,
acl: 'public-read',
},
}),

View File

@@ -42,7 +42,7 @@
},
"dependencies": {
"@payloadcms/plugin-cloud-storage": "workspace:*",
"uploadthing": "^6.10.1"
"uploadthing": "7.3.0"
},
"devDependencies": {
"payload": "workspace:*"