Javascript JQuery BlueImp文件上传插件在IE中返回空结果

Javascript JQuery BlueImp文件上传插件在IE中返回空结果,javascript,jquery,internet-explorer,file-upload,Javascript,Jquery,Internet Explorer,File Upload,我很难让BlueImp jQuery文件上传插件在IE中正常工作。它在所有其他经过测试的浏览器中都能正常工作。具体来说,我遇到的问题是“done”函数无法从我的处理程序(ASP.NET/C#)中获取数据。当我写入done函数发送到控制台的数据时,IE中的“result”属性为null。到目前为止,我看到的所有解决方案都说要么将ContentType设置为“text/plain”,要么确保返回的数据是数组。这两件事我都做过 这是从服务器返回的字符串(通过在IE9的开发者工具中捕获网络活动找到):

我很难让BlueImp jQuery文件上传插件在IE中正常工作。它在所有其他经过测试的浏览器中都能正常工作。具体来说,我遇到的问题是“done”函数无法从我的处理程序(ASP.NET/C#)中获取数据。当我写入done函数发送到控制台的数据时,IE中的“result”属性为null。到目前为止,我看到的所有解决方案都说要么将ContentType设置为“text/plain”,要么确保返回的数据是数组。这两件事我都做过

这是从服务器返回的字符串(通过在IE9的开发者工具中捕获网络活动找到):

以下是响应标题:

    Key Value
Response    HTTP/1.1 200 OK
Date    Tue, 03 Jan 2012 17:05:17 GMT
Server  Microsoft-IIS/6.0
X-Powered-By    ASP.NET
X-AspNet-Version    4.0.30319
Cache-Control   private
Content-Type    text/plain; charset=utf-8
Content-Length  506
这是“完成”函数返回的数据:

LOG: {
disabled : false,
dropZone : [object Object],
replaceFileInput : true,
singleFileUploads : true,
sequentialUploads : false,
forceIframeTransport : false,
multipart : true,
recalculateProgress : true,
formData : [object Object],[object Object],
add : function (e, data) {                 var that = $(this).data('fileupload');                 that._adjustMaxNumberOfFiles(-data.files.length);                 data.isAdjusted = true;                 data.isValidated = that._validate(data.files);          ,
processData : false,
contentType : false,
cache : false,
autoUpload : false,
minFileSize : 1,
acceptFileTypes : /.+$/i,
previewFileTypes : /^image\/(gif|jpeg|png)$/,
previewMaxWidth : 80,
previewMaxHeight : 80,
previewAsCanvas : true,
uploadTemplate : [object Object],
downloadTemplate : [object Object],
dataType : "iframe json",
send : function (e, data) {                 if (!data.isValidated) {                     var that = $(this).data('fileupload');                     if (!data.isAdjusted) {                         that._adjustMaxNumberOfFiles(-data.files.length);                ,
done : function (e, data) {                                 var that = $(this).data('fileupload');                 if (data.context) {                     data.context.each(function (index) {                         var file = ($.isArray(data.result) &&                    ,
fail : function (e, data) {                 var that = $(this).data('fileupload');                 that._adjustMaxNumberOfFiles(data.files.length);                 if (data.context) {                     data.context.each(function (index) {                     ,
progress : function (e, data) {                 if (data.context) {                     data.context.find('.ui-progressbar').progressbar(                         'value',                         parseInt(data.loaded / data.total * 100, 10)                     );   ,
progressall : function (e, data) {                 $(this).find('.fileupload-progressbar').progressbar(                     'value',                     parseInt(data.loaded / data.total * 100, 10)                 );             },
start : function () {                 $(this).find('.fileupload-progressbar')                     .progressbar('value', 0).fadeIn();             },
stop : function () {                 $(this).find('.fileupload-progressbar').fadeOut();             },
destroy : function (e, data) {                 var that = $(this).data('fileupload');                 if (data.url) {                     $.ajax(data)                         .success(function () {                             that._adjustMaxNumberOfFiles(1);      ,
fileInput : [object Object],
files : [object Object],
form : [object Object],
originalFiles : [object Object],
submit : function () {                     return (that._trigger('submit', e, newData) !== false) &&                         that._onSend(e, newData);                 },
isAdjusted : true,
isValidated : true,
context : [object Object],
paramName : "files[]",
url : "[myurl]/upload.ashx",
type : "POST",
uploadedBytes : 0,
lengthComputable : true,
loaded : 1,
total : 1,
result : null,
textStatus : "success",
jqXHR : [object Object]

我也面临同样的问题。你找到解决办法了吗?可能是重复的我从来没有找到解决办法。我做了一个粗略的工作,添加了一个服务端点,该服务端点将返回我需要的ID。它很有黑客性,因为它只是返回为具有给定名称的文件创建的最后一个ID。在我的例子中,这个解决方案是可以的,因为这个系统很少使用。YMMV
LOG: {
disabled : false,
dropZone : [object Object],
replaceFileInput : true,
singleFileUploads : true,
sequentialUploads : false,
forceIframeTransport : false,
multipart : true,
recalculateProgress : true,
formData : [object Object],[object Object],
add : function (e, data) {                 var that = $(this).data('fileupload');                 that._adjustMaxNumberOfFiles(-data.files.length);                 data.isAdjusted = true;                 data.isValidated = that._validate(data.files);          ,
processData : false,
contentType : false,
cache : false,
autoUpload : false,
minFileSize : 1,
acceptFileTypes : /.+$/i,
previewFileTypes : /^image\/(gif|jpeg|png)$/,
previewMaxWidth : 80,
previewMaxHeight : 80,
previewAsCanvas : true,
uploadTemplate : [object Object],
downloadTemplate : [object Object],
dataType : "iframe json",
send : function (e, data) {                 if (!data.isValidated) {                     var that = $(this).data('fileupload');                     if (!data.isAdjusted) {                         that._adjustMaxNumberOfFiles(-data.files.length);                ,
done : function (e, data) {                                 var that = $(this).data('fileupload');                 if (data.context) {                     data.context.each(function (index) {                         var file = ($.isArray(data.result) &&                    ,
fail : function (e, data) {                 var that = $(this).data('fileupload');                 that._adjustMaxNumberOfFiles(data.files.length);                 if (data.context) {                     data.context.each(function (index) {                     ,
progress : function (e, data) {                 if (data.context) {                     data.context.find('.ui-progressbar').progressbar(                         'value',                         parseInt(data.loaded / data.total * 100, 10)                     );   ,
progressall : function (e, data) {                 $(this).find('.fileupload-progressbar').progressbar(                     'value',                     parseInt(data.loaded / data.total * 100, 10)                 );             },
start : function () {                 $(this).find('.fileupload-progressbar')                     .progressbar('value', 0).fadeIn();             },
stop : function () {                 $(this).find('.fileupload-progressbar').fadeOut();             },
destroy : function (e, data) {                 var that = $(this).data('fileupload');                 if (data.url) {                     $.ajax(data)                         .success(function () {                             that._adjustMaxNumberOfFiles(1);      ,
fileInput : [object Object],
files : [object Object],
form : [object Object],
originalFiles : [object Object],
submit : function () {                     return (that._trigger('submit', e, newData) !== false) &&                         that._onSend(e, newData);                 },
isAdjusted : true,
isValidated : true,
context : [object Object],
paramName : "files[]",
url : "[myurl]/upload.ashx",
type : "POST",
uploadedBytes : 0,
lengthComputable : true,
loaded : 1,
total : 1,
result : null,
textStatus : "success",
jqXHR : [object Object]