Ajax Blueimp多文件上载响应解析错误
上传文件后,我遇到blueimp multi upload问题。 当表在ajax响应上重新填充时,比我在表中为所有上传的文件重新填充时,使用相同的删除链接和缩略图。如果我重新加载页面,则一切正常 在网络下检查响应我看到,对于所有检查过的图像,分别返回响应,但我的服务器以json格式发送已经上传的图像 这是我的密码Ajax Blueimp多文件上载响应解析错误,ajax,parsing,file-upload,blueimp,Ajax,Parsing,File Upload,Blueimp,上传文件后,我遇到blueimp multi upload问题。 当表在ajax响应上重新填充时,比我在表中为所有上传的文件重新填充时,使用相同的删除链接和缩略图。如果我重新加载页面,则一切正常 在网络下检查响应我看到,对于所有检查过的图像,分别返回响应,但我的服务器以json格式发送已经上传的图像 这是我的密码 $('#fileupload').fileupload( 'option', 'redirect', window.location.h
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/[^\/]*$/,
'/cors/result.html?%s'
)
);
// Load existing files:
$('#fileupload').addClass('fileupload-processing');
$.ajax({
// Uncomment the following to send cross-domain cookies:
xhrFields: {withCredentials: true},
url: '/documents/users/' + $('#profile-data').data('user-id'),
dataType: 'json',
context: $('#fileupload')[0],
beforeSend: function (xhr) {
xhr.setRequestHeader('X-CSRF-TOKEN', $('meta[name="csrf-token"]').attr('content'));
}
}).always(function () {
$(this).removeClass('fileupload-processing');
}).done(function (result) {
//here I get the response
$(this).fileupload('option', 'done')
.call(this, $.Event('done'), {result: result});
});
}
如何修复此错误