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 <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-15 14:29:33 +02:00
parent caa4b1c927
commit b490fe3ffc

View file

@ -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',