Use filename as title for media
This commit is contained in:
parent
b0416b61db
commit
1092c97f5d
|
@ -31,6 +31,7 @@ export const Audios = buildCollectionConfig({
|
|||
admin: {
|
||||
group: CollectionGroups.Media,
|
||||
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/audios/${id}`,
|
||||
useAsTitle: fields.filename,
|
||||
defaultColumns: [
|
||||
fields.filename,
|
||||
fields.thumbnail,
|
||||
|
|
|
@ -36,6 +36,7 @@ export const Images = buildImageCollectionConfig({
|
|||
admin: {
|
||||
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/images/${id}`,
|
||||
defaultColumns: [fields.filename, fields.posts, fields.updatedAt],
|
||||
useAsTitle: fields.filename,
|
||||
},
|
||||
upload: {
|
||||
imageSizes: [
|
||||
|
|
|
@ -17,6 +17,7 @@ export const Scans = buildImageCollectionConfig({
|
|||
plural: "Scans",
|
||||
},
|
||||
admin: {
|
||||
useAsTitle: fields.filename,
|
||||
defaultColumns: [fields.filename, fields.updatedAt],
|
||||
hidden: shownOnlyToAdmin,
|
||||
},
|
||||
|
|
|
@ -40,6 +40,7 @@ export const Videos = buildCollectionConfig({
|
|||
labels: { singular: "Video", plural: "Videos" },
|
||||
defaultSort: fields.filename,
|
||||
admin: {
|
||||
useAsTitle: fields.filename,
|
||||
group: CollectionGroups.Media,
|
||||
preview: ({ id }) => `${process.env.PAYLOAD_PUBLIC_FRONTEND_BASE_URL}/en/videos/${id}`,
|
||||
defaultColumns: [
|
||||
|
|
|
@ -5,7 +5,12 @@ import { buildCollectionConfig } from "../../utils/collectionConfig";
|
|||
export const VideosSubtitles = buildCollectionConfig({
|
||||
slug: Collections.VideosSubtitles,
|
||||
labels: { singular: "Video Subtitle", plural: "Videos Subtitles" },
|
||||
admin: { group: CollectionGroups.Media, disableDuplicate: true, hidden: shownOnlyToAdmin },
|
||||
admin: {
|
||||
useAsTitle: "filename",
|
||||
group: CollectionGroups.Media,
|
||||
disableDuplicate: true,
|
||||
hidden: shownOnlyToAdmin,
|
||||
},
|
||||
upload: {
|
||||
mimeTypes: ["text/*"],
|
||||
disableLocalStorage: true,
|
||||
|
|
Loading…
Reference in New Issue