๐Ÿ“ฆ payloadcms / plugin-seo

๐Ÿ“„ Media.ts ยท 26 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26import path from 'path'
import type { CollectionConfig } from 'payload/types'

const Media: CollectionConfig = {
  slug: 'media',
  access: {
    read: (): boolean => true,
  },
  admin: {
    useAsTitle: 'filename',
  },
  upload: {
    staticDir: path.resolve(__dirname, '../../uploads'),
  },
  fields: [
    {
      name: 'alt',
      label: 'Alt Text',
      type: 'text',
      required: true,
    },
  ],
}

export default Media