fix libs location in test-run,add jpeg png support
This commit is contained in:
parent
8c3790bead
commit
e43fabb216
14 changed files with 68 additions and 10 deletions
|
|
@ -51,9 +51,14 @@ import { LibreOfficeFileConverter } from 'libreoffice-file-converter';
|
|||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* text/html:
|
||||
* image/png:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* image/jpeg:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 500:
|
||||
* description: Server error
|
||||
*
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ export async function docxTemplateX(base: string=".", tdata: templateData, outpu
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** javascript-obfuscator:disable
|
||||
* @swagger
|
||||
* /api/v1/report-template/docx:
|
||||
|
|
@ -117,6 +115,14 @@ docxTemplateRoute.get("/", async function (req, res) {
|
|||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* image/png:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* image/jpeg:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 500:
|
||||
* description: Server error
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ export function mimeToExtension(mime: string): string {
|
|||
"text/csv": "csv",
|
||||
"text/markdown": "md",
|
||||
"text/plain": "txt",
|
||||
"application/rtf": "rtf"
|
||||
"application/rtf": "rtf",
|
||||
"image/png": "png",
|
||||
"image/jpeg": "jpeg",
|
||||
}
|
||||
if (mimeList[mime]) {
|
||||
return mimeList[mime]
|
||||
|
|
|
|||
|
|
@ -85,6 +85,18 @@
|
|||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"image/png": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/jpeg": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -185,6 +197,18 @@
|
|||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/png": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/jpeg": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -301,6 +325,18 @@
|
|||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/png": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
},
|
||||
"image/jpeg": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -104,6 +104,14 @@ xlsxTemplateRoute.get("/", async function (req, res) {
|
|||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* image/png:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* image/jpeg:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 500:
|
||||
* description: Server error
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue