I've faced the problem of multiple images upload and resulted in quick workaround.
Please take more detailed view on this problem and eventually fix the multiple images upload functionality.
Problem:
Current licensed version of WYSIWYG Redactor by Imperavi is version dated October 2015 (really old and outdated, please consider getting a fresh one!).
Redactor supports multipleImageUpload setting only starting from version 1.2 dated December 16th, 2015
Workaround:
I've found the problematic place in the redactor.js file
onDrop: function (e) {
e = e.originalEvent || e;
var files = e.dataTransfer.files;
this.upload.traverseFile(files[0], e);
As you can see, only the first image will be uploaded, as it is hardcoded files[0] in the JavaScript.
There are more similar hardcoded files[0] fragments.
So, small change to have a loop on all images helped me to solve the problem:
onDrop: function (e) {
e = e.originalEvent || e;
var files = e.dataTransfer.files;
for (var index = 0; index < files.length; ++index) {
this.upload.traverseFile(files[index], e);
}
Now user can drop multiple files to the upload box and it works fine, except of progress bar that works incorrectly.
I've faced the problem of multiple images upload and resulted in quick workaround. Please take more detailed view on this problem and eventually fix the multiple images upload functionality.
Problem:
Workaround: I've found the problematic place in the redactor.js file
As you can see, only the first image will be uploaded, as it is hardcoded files[0] in the JavaScript. There are more similar hardcoded files[0] fragments.
So, small change to have a loop on all images helped me to solve the problem:
Now user can drop multiple files to the upload box and it works fine, except of progress bar that works incorrectly.
PS. No changes are needed on PHP side