Files
payloadcms/test/storage-vercel-blob/collections/Media.ts
Elliot DeNolf fa49e04cf8 feat(storage-vercel-blob): allow fallback to disk if token not set (#10005)
Previously with `@payloadcms/plugin-storage-blob`, if token was not set,
the plugin would throw an error. This caused a less-than-ideal developer
experience.

With this change, if the `token` value is undefined:
- Local storage will be used as a fallback
- The error will no longer be thrown.
2024-12-16 21:40:22 +00:00

34 lines
561 B
TypeScript

import type { CollectionConfig } from 'payload'
export const Media: CollectionConfig = {
slug: 'media',
upload: {
resizeOptions: {
position: 'center',
width: 200,
height: 200,
},
imageSizes: [
{
height: 400,
width: 400,
crop: 'center',
name: 'square',
},
{
width: 900,
height: 450,
crop: 'center',
name: 'sixteenByNineMedium',
},
],
},
fields: [
{
name: 'alt',
label: 'Alt Text',
type: 'text',
},
],
}