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 committed by David Mehren
parent 846bbeb390
commit aa41bebbf0
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

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