This commit is contained in:
2026-02-04 13:49:07 +03:30
parent 5fd6611aca
commit de14d531e1
222 changed files with 7053 additions and 57956 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Body, Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common'
import { FileInterceptor } from '@nestjs/platform-express'
import { ImageUploaderService } from './image-uploader.service'
@Controller('uploads')
export class UploadsController {
constructor(private readonly imageUploaderService: ImageUploaderService) {}
@Post('image')
@UseInterceptors(FileInterceptor('file'))
async uploadImage(
@UploadedFile() file: Express.Multer.File,
@Body('accountId') accountId: string,
@Body('type') type: string,
) {
const url = await this.imageUploaderService.uploadImage(file, accountId, type)
return { url }
}
}