(@CurrentAuth() auth: AuthContext | null, @NestUploadedFile() file: any)
| 57 | }) |
| 58 | @UseInterceptors(FileInterceptor('file')) |
| 59 | async uploadFile(@CurrentAuth() auth: AuthContext | null, @NestUploadedFile() file: any) { |
| 60 | if (!file) { |
| 61 | throw new BadRequestException('No file provided'); |
| 62 | } |
| 63 | |
| 64 | return this.filesService.uploadFile(auth, file.originalname, file.buffer, file.mimetype); |
| 65 | } |
| 66 | |
| 67 | @Get() |
| 68 | @ApiOkResponse({ |
nothing calls this directly
no test coverage detected