31 lines
665 B
TypeScript
31 lines
665 B
TypeScript
import type { CollectionConfig } from 'payload'
|
|
import { ADMIN_GROUP } from '../admin/groups'
|
|
|
|
export const Media: CollectionConfig = {
|
|
slug: 'media',
|
|
labels: { singular: 'Файл', plural: 'Медиа' },
|
|
admin: { group: ADMIN_GROUP.content },
|
|
upload: {
|
|
staticDir: 'media',
|
|
mimeTypes: [
|
|
'image/*',
|
|
'video/mp4',
|
|
'video/webm',
|
|
'video/quicktime',
|
|
'application/pdf',
|
|
'application/msword',
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
],
|
|
},
|
|
access: {
|
|
read: () => true,
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'alt',
|
|
type: 'text',
|
|
localized: true,
|
|
},
|
|
],
|
|
}
|