mardi 12 juillet 2016
I want to find out the length of Dropzone
I am new here i came up the issue i am using dropzone for file upload on button click it gives me length is undefined. Please help me solve my issue. When i remove ready function it is not working properly thats why i kept document ready function. here is my code below html and ready function and ajax call function.
HTML
<form action="#" class="dropzone" id="dropzone">
<div class="fallback">
<input name="file" id="fileupload" type="file" multiple="multiple">
</div>
</form>
On Load Function`
$(function () {
$('#dropzone').dropzone();
});
AJAX Call
var imagedata = new FormData();
var fileUpload = document.getElementById("dropzone").files.length;
// var countfiles = $('#dropzone').files;
// alert(countfiles);
for (var i = 0; i < fileUpload; i++) {
var filname = document.getElementById("dropzone").files[i];
imagedata.append("FileName", filname);
}
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire