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.
34 lines
561 B
TypeScript
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',
|
|
},
|
|
],
|
|
}
|