Files
payload/test/plugin-cloud/collections/Media.ts
Jessica Chowdhury fcbe5744d9 fix: upload editing error with plugin-cloud (#4170)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-12-01 16:35:12 -05:00

34 lines
634 B
TypeScript

import type { CollectionConfig } from '../../../packages/payload/src/collections/config/types'
export const Media: CollectionConfig = {
slug: 'media',
access: {
read: () => true,
create: () => true,
},
upload: {
staticURL: process.env.PAYLOAD_PUBLIC_SERVER_URL,
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',
},
],
}