只有在单击添加按钮后,我才想要多个放置区。可能吗?那怎么办?
我试过这个。但不工作
$(".image_upload .add_new").click(function(){
$(".image_upload").append('<form action="/upload-target" class="dropzone" id="singledropzone"></form>');
});
我的拖放区选项。
Dropzone.options.singledropzone = {
maxFilesize: 0.5,
dictDefaultMessage: "UPLOAD IMAGE",
maxFiles: 1,
clickable: true,
thumbnailWidth: 140,
thumbnailHeight: 140,
maxThumbnailFilesize: 0.5,
init: function() {
this.on("maxfilesexceeded", function(file) {
this.removeAllFiles();
this.addFile(file);
});
}
}