Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-05-19 13:30:03 +02:00
parent bf16b2b010
commit 0d20e7f738
2 changed files with 20 additions and 6 deletions

View File

@ -2,10 +2,6 @@ import { CollectionConfig } from "payload/types";
export const Media: CollectionConfig = {
slug: "media",
labels: {
singular: "Bild",
plural: "Bilder",
},
admin: {},
access: {
read: (): boolean => true,
@ -15,10 +11,16 @@ export const Media: CollectionConfig = {
upload: {
staticURL: "/media",
staticDir: "media",
mimeTypes: ["image/*"],
adminThumbnail: ({ doc }) => `/media/${doc.src}`,
},
fields: [],
fields: [
{
name: "alt",
type: "text",
},
],
};
export default Media;

12
tsconfig.json Normal file
View File

@ -0,0 +1,12 @@
{
"include": ["*.ts"],
"exclude": ["node_modules"],
"references": [
{
"path": "./astro/tsconfig.json"
},
{
"path": "./payload/tsconfig.json"
}
]
}