mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-26 05:55:15 +00:00
Merge pull request #9301 from mkllnk/3975-unsupported-image
Allow SVG images for products and show errors when uploading unsupported file
This commit is contained in:
@@ -13,3 +13,9 @@ angular.module("ofn.admin").factory "ProductImageService", (FileUploader, SpreeA
|
||||
@imageUploader.onSuccessItem = (image, response) =>
|
||||
product.thumb_url = response.thumb_url
|
||||
product.image_url = response.image_url
|
||||
@imageUploader.onErrorItem = (image, response) =>
|
||||
if Array.isArray(response.errors)
|
||||
message = response.errors.join("\n")
|
||||
else
|
||||
message = response.error.toString()
|
||||
alert(message)
|
||||
|
||||
Reference in New Issue
Block a user