diff --git a/modules/hudozka-api/src/factory/file.ts b/modules/hudozka-api/src/factory/file.ts index 7066de88..2bf7b6ba 100644 --- a/modules/hudozka-api/src/factory/file.ts +++ b/modules/hudozka-api/src/factory/file.ts @@ -6,6 +6,7 @@ export type FileDto = { slug: string name: string cover?: ImageDto + filepath: string file: { name: string size: number @@ -22,6 +23,7 @@ export function encodeFile(file: Document): FileDto { slug: file.id, cover, name: file.title, + filepath: file.file, file: { type: 'application/pdf', name: file.fileInfo.name, diff --git a/modules/hudozka-api/src/factory/image.ts b/modules/hudozka-api/src/factory/image.ts index 587c747a..2aca2408 100644 --- a/modules/hudozka-api/src/factory/image.ts +++ b/modules/hudozka-api/src/factory/image.ts @@ -6,6 +6,7 @@ export type ImageDto = { width: number height: number src: string + filepath: string } export function encodeImage(image: Image): ImageDto { @@ -18,5 +19,6 @@ export function encodeImage(image: Image): ImageDto { src: a.url, width: a.width, height: a.height, + filepath: image.file, } }