Controller routes
Finishing the file-related routes in the products controller.
@Param() { id }: IdDto,return this.productsService.uploadImages(id, files);export class FilenameDto {
@IsString()
readonly filename: string;
}export class IdFilenameDto extends IntersectionType(IdDto, FilenameDto) {}@Get(':id/images/:filename')
downloadImage(@Param() { id, filename }: IdFilenameDto) {
return this.productsService.downloadImage(id, filename);
}Last updated