My system doesn't allow multiple file input, and I'm not using AJAX.
My situation is that I want to add images from 1 input file "multiple", and map them to a number of hidden file inputs. Is that possible?
In this link https://github.com/blueimp/jQuery-File-Upload/wiki/Options html
<form method="post" action="path">
<input type="file" name="temp" id="temp" multiple>
<input type="file" name="images" id="images" style="display: none">
<input type="file" name="images2" id="images2" style="display: none">
<input type="file" name="images3" id="images3" style="display: none">
<input type="file" name="images4" id="images4" style="display: none">
<input type="file" name="images5" id="images5" style="display: none">
</form>
Javascript
jQuery(document).ready(function($){
$('#form').fileupload({
paramName: ["images", "images2", "images3", "images4", "images5"],
fileInput: $('#form input#temp'),
replaceFileInput: false,
change: function (e, data) {
$.each(data.files, function (index, file) {
console.log('Selected file: ' + file.name);
});
}
})
})
I've tried to set parameter "fileInput" to the temp file input and I set "paramName" to the array of the other file inputs, but its not working, and seems not to be used for that purpose.
Can it be done?
Fileobjects toFileListobject? Does jQuery-File-Upload plugin use ajax? Can you includehtml,javascriptthat you have tried at Question?