I am using jqgrid, and I need to upload files from two different inputs using one ajax file upload call. I can upload one file using the fileElementId, but is there any way to upload two files simultaneously?
function uploadFiles(dfcId) {
$.ajaxFileUpload({
url: '/DigitalFileCabinet/UploadFile',
type: 'POST',
dataType: 'json',
secureuri: true,
async: false,
data: { id: dfcId },
fileElementId: "file1",
success: function (response, status) {
//success code
},
error: function (data, status, e) {
if (status === 'success')
return;
else
return alert('Failed to upload PDF!');
}
});
};
I have tried the following method, which uses an array to get two file elements at once and upload, but it didn't work. https://www.programmersought.com/article/194562558/