function addthumdropzone(){
var myDropzone = Dropzone("#myDropzone");
var myFile = {
name: "mypdf.pdf",
size: 987654321
};
myDropzone.emit("addedfile", myFile);
myDropzone.emit("thumbnail", myFile, "http://localhost/simas/data/uploads/26");
};
我的代码出了什么问题?为什么我的firefox显示错误
TypeError: this.defaultOptions is undefined
我的初学者,我在document.ready
时打电话function dropzoneinit(){
if(typeof Dropzone != 'undefined')
{
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("#myDropzone", {
url: "engine/action/action.php",
maxFileSize: 50,
acceptedFiles: ".pdf",
addRemoveLinks: true
});
myDropzone.on("removedfile", function(file) {
iddata=document.getElementById("fkirimemailiddata").value;
$.ajax({
url: "engine/action/action.php",
type: "POST",
data: { 'what': 'deleteattacment','fkirimemailiddata' :iddata,'fkirimemailnmfile' :file.name}
});
});
}
};
答案 0 :(得分:0)
确保页面中包含dropzone.js。 看来你错过了新的'关键词。试试这个:
var myDropzone = new Dropzone("#myDropzone");