import { Injectable } from "@nestjs/common"; import { IFile } from "../utils/interfaces/IFile"; import { S3Service } from "../utils/providers/s3.service"; @Injectable() export class UploaderService { constructor(private s3Service: S3Service) {} async upload(file: IFile) { return await this.s3Service.upload(file); } async uploadMultiple(files: IFile[]) { // const uploadPromises = files.map((file) => this.s3Service.upload(file)); // return await Promise.all(uploadPromises); return this.s3Service.uploadMultiple(files); } }