I Don't understand that... call
its always undefined
Create the mock file:
var mockFile = { name: "Filename", size: 12345 };
Call the default addedfile event handler
myDropzone.options.addedfile.call(myDropzone, mockFile);
And optionally show the thumbnail of the file:
myDropzone.options. thumbnail.call(myDropzone, mockFile, "/image/url");
Finally !!
$(function() { var mockFile = { name: "banner2.jpg", size: 12345 }; var myDropzone = new Dropzone("#my-awesome-dropzone"); myDropzone.options.addedfile.call(myDropzone, mockFile); myDropzone.options.thumbnail.call(myDropzone, mockFile, "http://localhost/test/drop/uploads/banner2.jpg"); })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With