【发布时间】:2014-06-30 15:35:24
【问题描述】:
我正在使用 dropzone.js 将图像上传到浏览器。我需要将这些图像上传到服务器。我是否需要使用 Handler.ashx 来获取图像,我该怎么做?这是我的代码
$(document).ready(function (obj) {
Dropzone.options.myAwesomeDropzone = { // The camelized version of the ID of the form element
// The configuration we've talked about above
url: '#',
previewsContainer: ".dropzone-previews",
uploadMultiple: true,
parallelUploads: 100,
maxFiles: 100,
dictDefaultMessage: "",
accept: function(file, done) {
//in here I can access each file that dropping on to the browser
},
init: function () {
this.on("drop", function (file) {
});
this.on("uploadprogress", function (file, progress) {
//if (progress == 100) {
console.log(progress);
//}
});
this.on("maxfilesexceeded", function (file) {
alert("No more files please!");
});
this.on("complete", function (file) {
if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {
alert(file.name);
}
});
}
}
createDropzone();});
我是这个领域的新手,有什么帮助吗?
【问题讨论】:
-
不,我没有使用 MVC
标签: c# javascript jquery asp.net dropzone.js