How can we upload direct folder to input type file ? I mean user can upload direct folder of images or files instead of selecting multiple files?
Asked
Active
Viewed 147 times
0
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 15 '22 at 09:45
1 Answers
0
that's a javascript question
<div class="picker"><input type="file" id="picker" name="fileList" webkitdirectory multiple></div>
let picker = document.getElementById('picker');
picker.addEventListener('change', e => {
for (let file of Array.from(e.target.files)) {
//now append files to formdata
};
});
found this on previous question Upload folder and all its content in JavaScript

mohamed naser
- 359
- 3
- 9