I Don\'t understand that... call its always undefined
Create the mock file:
var mockFile = { name: \"Filename\", size: 12345 };
my solution for >= 4.0, basing on "How to show files already stored on server": https://github.com/enyo/dropzone/wiki/FAQ
maxFiles: 1,
init: function () {
this.on('maxfilesexceeded', function (file) {
this.removeAllFiles();
this.addFile(file);
});
var mocks = $dropzone.data('dropzone');
for (var i = 0; i < mocks.length; i++) {
var mock = mocks[i];
mock.accepted = true;
this.files.push(mock);
this.emit('addedfile', mock);
this.createThumbnailFromUrl(mock, mock.url);
this.emit('complete', mock);
}
}