
import { Controller, Post, UploadedFiles, UseInterceptors } from '@nestjs/common';
import { FilesInterceptor } from '@nestjs/platform-express';
import { PicturesService } from './pictures.service';

@Controller('pictures')
export class PicturesController {
  constructor(private readonly picturesService: PicturesService) {}

  @Post('upload')
  @UseInterceptors(FilesInterceptor('urlImg'))
  async uploadFile(@UploadedFiles() files: Express.Multer.File[]) {
    console.log(files);
  
    
    // const result = await this.picturesService.saveImages(files);
    // console.log(result);
    
    return {data: ["result"]}
  }
}
