mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05:00
Use POST /media
for file upload
The old `/media/upload` subpath does not follow the convention of REST APIs. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
eb77642604
commit
f4c73a8f96
2 changed files with 2 additions and 2 deletions
|
@ -454,7 +454,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: my-note
|
example: my-note
|
||||||
/media/upload:
|
/media:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- media
|
- media
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class MediaController {
|
||||||
this.logger.setContext(MediaController.name);
|
this.logger.setContext(MediaController.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('upload')
|
@Post()
|
||||||
@UseInterceptors(FileInterceptor('file'))
|
@UseInterceptors(FileInterceptor('file'))
|
||||||
async uploadImage(
|
async uploadImage(
|
||||||
@UploadedFile() file: MulterFile,
|
@UploadedFile() file: MulterFile,
|
||||||
|
|
Loading…
Reference in a new issue