Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I show you the files already stored on server using Dropzone.js

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"); 
like image 345
Marcogomesr Avatar asked Jul 20 '13 06:07

Marcogomesr


1 Answers

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"); }) 
like image 152
Marcogomesr Avatar answered Sep 21 '22 17:09

Marcogomesr