From 79d3368041834b77a74714c58e9e1b2d8236c6b8 Mon Sep 17 00:00:00 2001 From: consultoria-as Date: Tue, 26 May 2026 05:18:14 +0000 Subject: [PATCH] fix: image upload field name in ML modal (use 'file' to match inventory_bp endpoint) --- pos/static/js/inventory.js | 2 +- pos/templates/inventory.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pos/static/js/inventory.js b/pos/static/js/inventory.js index 4fda21c..a503d2c 100644 --- a/pos/static/js/inventory.js +++ b/pos/static/js/inventory.js @@ -865,7 +865,7 @@ if (!input.files || !input.files[0]) return; var file = input.files[0]; var formData = new FormData(); - formData.append('image', file); + formData.append('file', file); fetch('/pos/api/inventory/items/' + itemId + '/image', { method: 'POST', headers: { 'Authorization': 'Bearer ' + token }, diff --git a/pos/templates/inventory.html b/pos/templates/inventory.html index 832667c..738efb1 100644 --- a/pos/templates/inventory.html +++ b/pos/templates/inventory.html @@ -908,7 +908,7 @@ - +