import { Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common'; import { ImageService } from './image.service'; import { FileInterceptor } from '@nestjs/platform-express'; @Controller('image') export class ImageController { constructor(private readonly imageService: ImageService) {} @Post() @UseInterceptors(FileInterceptor('file')) async uploadImage(@UploadedFile() file: Express.Multer.File) { return this.imageService.uploadImage(file) } }