hudozka api file/image dto added filepath
This commit is contained in:
1 parent
dfeed175e9
commit
d446e549a6
2 files changed
+4
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user