Skip to content

Instantly share code, notes, and snippets.

@jedsmith13
jedsmith13 / File Upload
Created June 25, 2019 15:50
Uploading files using NestJS
// File Upload Controller
@Post(':id/upload-image')
@UseGuards(CustomAuthGuard)
@UseInterceptors(FilesInterceptor('files'))
public async uploadActivityImage(
@Param() params: any,
@UploadedFiles() files: any,
@Body() data: any,
): Promise<{
itemId: number;