![](/img/trans.png)
[英]How to do that dropzone.js take into account the preload images when I set the limit count of upload images?
[英]How to Preload images using dropzone.js
我想預加載一些圖像並在以后將其刪除。 我看過一些教程,但似乎沒有用。 我的php端是正確的,為了進行故障排除,我直接引用了文件名和大小。 仍然沒有任何反應。
如果您對此有所了解,請幫助我。 謝謝!
Dropzone.options.myAwesomeDropzone = {
init: function() {
// var thisDropzone = this;
$.get(getPic_url, function(data) {
$.each(data, function(key,value){ //loop through it
var mockFile = { name: 'surf-1477342168.jpg', size: 5398538 }; // here we get the file name and size as response
Dropzone.options.myAwesomeDropzone.emit("addedfile", mockFile);
// thisDropzone.options.addedfile.call(thisDropzone, mockFile);
// thisDropzone.options.thumbnail.call(thisDropzone, mockFile, "__UPLOAD__/surf-1477342168.jpg");
});
});
},
var mockFile = { name: 'surf-1477342168.jpg', size: 5398538 };
// Call the default addedfile event handler
thisDropzone.emit("addedfile", mockFile);
// And optionally show the thumbnail of the file:
thisDropzone.emit("thumbnail", mockFile, "__UPLOAD__/surf-1477342168.jpg");
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.