mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2026-01-04 12:04:58 +01:00
ProductBarcode: add image downloading from remote product database
- Backend download images from the database - Frontend retrieve the image as base64, no architecture change needed
This commit is contained in:
@@ -315,6 +315,16 @@
|
||||
{
|
||||
form.name = active.params.item.name;
|
||||
form.description = active.params.item.description;
|
||||
|
||||
if(active.params.imageURL)
|
||||
{
|
||||
form.photos.push({
|
||||
photoName: "product_view.jpg",
|
||||
fileBase64: active.params.imageBase64,
|
||||
primary: form.photos.length === 0,
|
||||
file: dataURLtoFile(active.params.imageBase64 ,"product_view.jpg")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (labelId.value) {
|
||||
|
||||
Reference in New Issue
Block a user