From b490fe3ffc140794ac611d19ca0acbba48e8774c Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Thu, 15 Apr 2021 14:29:33 +0200 Subject: [PATCH] PublicAPI: Add file upload dialog to swagger api This makes it possible to truly upload a file with swagger api documentation. Signed-off-by: Philip Molares --- src/api/public/media/media.controller.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api/public/media/media.controller.ts b/src/api/public/media/media.controller.ts index 388121045..27f960c23 100644 --- a/src/api/public/media/media.controller.ts +++ b/src/api/public/media/media.controller.ts @@ -67,7 +67,15 @@ export class MediaController { @Post() @ApiConsumes('multipart/form-data') @ApiBody({ - description: 'The binary file to upload', + schema: { + type: 'object', + properties: { + file: { + type: 'string', + format: 'binary', + }, + }, + }, }) @ApiHeader({ name: 'HedgeDoc-Note',