Skip to content

Commit

Permalink
hallo
Browse files Browse the repository at this point in the history
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
  • Loading branch information
mooxl committed May 19, 2023
1 parent bf16b2b commit 0d20e7f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 8 additions & 6 deletions payload/src/collections/Media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 changes: 12 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"include": ["*.ts"],
"exclude": ["node_modules"],
"references": [
{
"path": "./astro/tsconfig.json"
},
{
"path": "./payload/tsconfig.json"
}
]
}

0 comments on commit 0d20e7f

Please sign in to comment.