Skip to content

Instantly share code, notes, and snippets.

@sunnyy02
Last active September 10, 2022 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunnyy02/d0c424470ecfb80b161b9c23fda56230 to your computer and use it in GitHub Desktop.
Save sunnyy02/d0c424470ecfb80b161b9c23fda56230 to your computer and use it in GitHub Desktop.
@Post('upload')
@UseInterceptors(FileInterceptor('file'))
async uploadFile(
@UploadedFile() file: Express.Multer.File,
@Request() req,
): Promise<any> {
const result = await this.fileservice.uploadPublicFile(
file.buffer,
file.originalname,
);
return new ResponseModel(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment