I am using Dropzone:
jQuery(function () {
let dropzone = jQuery("#upload-box")
dropzone.dropzone({
url: "/file/upload",
autoProcessQueue: false,
addedfile: function (file) {
console.log(file)
}
})
})
On added file I wan't to add it to an input <input type="file" name="file">
. I know how to create to input but don't know how to add the file, so when I submit the whole form to get it in the $_FILES
array on the server. #upload-box
is div, not a form and that's why I want to add every file in <input type="file" name="file">
.