This commit is contained in:
2024-05-15 17:35:04 -05:00
parent 474d7c63d5
commit f51a298227
39 changed files with 333 additions and 260 deletions

View File

@@ -18,11 +18,11 @@ export class ImageController {
private selectOptions: SelectOptionsService,
) {}
@Post('uploadPropertyPicture/:id')
@Post('uploadPropertyPicture/:imagePath')
@UseInterceptors(FileInterceptor('file'))
async uploadPropertyPicture(@UploadedFile() file: Express.Multer.File, @Param('id') id: string) {
const imagename = await this.fileService.storePropertyPicture(file, id);
await this.listingService.addImage(id, imagename);
async uploadPropertyPicture(@UploadedFile() file: Express.Multer.File, @Param('imagePath') imagePath: string) {
const imagename = await this.fileService.storePropertyPicture(file, imagePath);
await this.listingService.addImage(imagePath, imagename);
}
@Post('uploadProfile/:id')