mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-29 06:03:44 +00:00
Add media upload route to MediaController
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
06b0d19c4b
commit
f98bf0d32d
1 changed files with 17 additions and 2 deletions
|
@ -1,4 +1,19 @@
|
|||
import { Controller } from '@nestjs/common';
|
||||
import {
|
||||
Controller,
|
||||
Logger,
|
||||
Post,
|
||||
UploadedFile,
|
||||
UseInterceptors,
|
||||
} from '@nestjs/common';
|
||||
import { FileInterceptor } from '@nestjs/platform-express';
|
||||
|
||||
@Controller('media')
|
||||
export class MediaController {}
|
||||
export class MediaController {
|
||||
private readonly logger = new Logger(MediaController.name);
|
||||
|
||||
@Post('upload')
|
||||
@UseInterceptors(FileInterceptor('file'))
|
||||
uploadImage(@UploadedFile() file) {
|
||||
this.logger.debug('Recieved file: ' + file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue