Files
payload/test/plugin-seo/collections/Media.ts
Patrik cb5d005e68 test: passing array fields test suite (#5383)
* test: array tests passing except bulk update

* test: passing array fields test suite
2024-03-20 12:00:56 -04:00

36 lines
686 B
TypeScript

import type { CollectionConfig } from 'payload/types'
import path from 'path'
import { fileURLToPath } from 'url'
import { mediaSlug } from '../shared.js'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
export const Media: CollectionConfig = {
slug: mediaSlug,
upload: {
staticDir: path.resolve(dirname, '../media'),
},
fields: [
{
type: 'upload',
name: 'media',
relationTo: 'media',
filterOptions: {
mimeType: {
equals: 'image/png',
},
},
},
{
type: 'richText',
name: 'richText',
},
],
}
export const uploadsDoc = {
text: 'An upload here',
}