I need to upload an unlimited number of images from a users disk to Laravel storage, and would prefer to do it without changing any parameters if possible,
I found the following code on your site
document.getElementById("customFile").addEventListener("change", function(event) {
let files = event.target.files;
var data = {};
for (let i=0; i<files.length; i++) {
data[i]=files[i].webkitRelativePath;
console.log(files[i].webkitRelativePath);
};
which allows me to loop through the files. Is there a way to use this code to upload the files to storage one by one ?
Thanks
I tired to pass the array to my controller, hoping I could loop though it and store each file, but that didn’t work.