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

View File

@ -16,6 +16,7 @@ services:
volumes: volumes:
- ./payload/src:/base/src - ./payload/src:/base/src
- ./astro/src/types.ts:/types.ts - ./astro/src/types.ts:/types.ts
- ./data/media:/base/dist/media
ports: ports:
- 3001:3001 - 3001:3001

View File

@ -12,7 +12,7 @@ export const Media: CollectionConfig = {
staticURL: "/media", staticURL: "/media",
staticDir: "media", staticDir: "media",
mimeTypes: ["image/*"], mimeTypes: ["image/*"],
adminThumbnail: ({ doc }) => `/media/${doc.src}`, adminThumbnail: ({ doc }) => `${process.env.PAYLOAD_URL}/media/${doc.src}`,
}, },
fields: [ fields: [