'Multiple File Upload with file stack file picker (I can more than 1 file select but only 1 file upload)

I am building an onlineshop with engraving options and I currently testing the upload field of the file stack file picker for uploading engravings. I would like that the customer has the opportunity to select more than 1 file per Upload.

For this reasan I changed in my theme code the number after "maxFiles" in 3.

The selected 3 files are also displayed in the file picker, but when I want to upload them, only 1 file is uploaded. What could I rewrite in the code below so that I can not only select these 3 files but also upload them together? Thank you very much for your help!

Here is my current code, which I have in my theme.liquid (my system is shopify):

var fsClient = filestack.init('APIKEY CODE'); function fieldAddedCallback(field, element) { if(element.hasClass("uploader")) { element.find("input").remove(); element.append(""); element.append(""); element.append(""); element.append("Gravur hochladen"); element.find("button").click(function() { var options = { "maxFiles": 3, "accept": [ "image/jpeg", "image/jpg", "image/png", "image/bmp", "image/gif" ], "uploadInBackground": false, onUploadDone: updateForm, lang: "de" }; fsClient.picker(options).open(); function updateForm (result) { var fileData = result.filesUploaded[0]; console.log(fileData); element.find("input").val(fileData.url); element.find(".fileuploadname").val(fileData.filename); element.find(".labelname").text(fileData.filename); }; }); } }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source