Is there any way to store the uploaded file as a html element like in file input in dropzone.js? And not upload automatically?
I have referred these, but didn't helped.
Currently I'm directly uploading the files to the server on drop like this,
$(this).dropzone({
url: base_url + 'document-manager',
addRemoveLinks: true,
dictDefaultMessage: 'Drop files or click here to upload',
maxFiles: 1,
init: function () {
myDropzone = this;
myDropzone.on("success", function (file, response) {
fileId = response;
});
myDropzone.on("removedfile", function (file) {
$.ajax({
type: "delete",
url: base_url + 'document-manager/' + fileId,
async: false,
data: {'_token': $('[name=_token').val()}
}).responseText;
});
}
});
Now I want to send the files as the file input. Is it possible in dropzone.js?
P.S. I just want to store the selected file from dropzone to store in some custom file input.