validatedCity, mask for input, confirmatonService, Version Info,
This commit is contained in:
@@ -12,7 +12,7 @@ export class ImageService {
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
uploadImage(imageBlob: Blob, type: 'uploadPropertyPicture' | 'uploadCompanyLogo' | 'uploadProfile', imagePath: string, serialId?: number) {
|
||||
async uploadImage(imageBlob: Blob, type: 'uploadPropertyPicture' | 'uploadCompanyLogo' | 'uploadProfile', imagePath: string, serialId?: number) {
|
||||
let uploadUrl = `${this.apiBaseUrl}/bizmatch/image/${type}/${imagePath}`;
|
||||
if (type === 'uploadPropertyPicture') {
|
||||
uploadUrl = `${this.apiBaseUrl}/bizmatch/image/${type}/${imagePath}/${serialId}`;
|
||||
@@ -20,9 +20,10 @@ export class ImageService {
|
||||
const formData = new FormData();
|
||||
formData.append('file', imageBlob, 'image.png');
|
||||
|
||||
return this.http.post(uploadUrl, formData, {
|
||||
observe: 'events',
|
||||
});
|
||||
// return this.http.post(uploadUrl, formData, {
|
||||
// observe: 'events',
|
||||
// });
|
||||
return await lastValueFrom(this.http.post(uploadUrl, formData));
|
||||
}
|
||||
|
||||
async deleteListingImage(imagePath: string, serial: number, name?: string) {
|
||||
|
||||
Reference in New Issue
Block a user