Last active
September 10, 2022 23:28
-
-
Save sunnyy02/d0c424470ecfb80b161b9c23fda56230 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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