diff --git a/src/MistoxWebsite.Client/src/app/models/Product.ts b/src/MistoxWebsite.Client/src/app/models/Product.ts index 1f359f5..1904aab 100644 --- a/src/MistoxWebsite.Client/src/app/models/Product.ts +++ b/src/MistoxWebsite.Client/src/app/models/Product.ts @@ -11,5 +11,5 @@ export class Product { export class ProductImage { imageID: number = 0; productID: number = 0; - image: Blob | null = null; + imageSrc: string = ""; } \ No newline at end of file diff --git a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts index ab4312b..6871181 100644 --- a/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts +++ b/src/MistoxWebsite.Client/src/app/pages/store/catalog/catalog.component.ts @@ -29,7 +29,7 @@ export class CatalogComponent { this.Products.forEach(item => { item.images.forEach(img => { http.get("https://mistox.com/api/productimage/get?ProductID=" + img.productID + "&ImageID=" + img.imageID, { responseType: 'blob' }).subscribe(blob => { - img.image = blob; + img.imageSrc = URL.createObjectURL(blob); }); }); });