使用不同的文件ID上传多个文件ajaxFileUpload [英] upload multiple files with ajaxFileUpload with different file ids
问题描述
我使用了
$ .ajaxFileUpload
$ b $ url url:'uploadfile',
secureuri:false,
fileElementId:'setup',
dataType:'text',
数据:{id:id},
成功:函数(数据,状态){
if(status =='success'){
return;
} else {
}
},
错误:function(data,status,e){
return alert('错误!上传失败file!');
}
}
)
我的问题是我有很多文件上传单个请求。例如setup1,setup2,setup3(不同的ID)。如何给ajaxFileUpload多个ID?感谢您的好意
谢谢
考虑使用这个用于multiUpload的JQuery插件。
http://hayageek.com/docs/jquery-upload-file.php
I am trying to upload multiple files in the same form. Multiple files should be in different fields. I used ajaxfileuploader for single file and receive it using MultipartHttpServletRequest. And it was successful.
I used
$.ajaxFileUpload
(
{
url: 'uploadfile',
secureuri: false,
fileElementId:'setup',
dataType: 'text',
data: { id: id },
success: function (data, status) {
if (status == 'success') {
return;
} else {
}
},
error: function (data, status, e) {
return alert('Error ! Failed to upload file!');
}
}
)
But my problem is I have many files to be uploaded by single request. For example setup1,setup2,setup3 (different ids). How to give multiple ids on ajaxFileUpload? Your kind reply is appreciated
Thank you
Consider to use this JQuery plugin for multiUpload. http://hayageek.com/docs/jquery-upload-file.php
这篇关于使用不同的文件ID上传多个文件ajaxFileUpload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!