After weeks of tweaking I finally gave up. I just couldn\'t fix my multiple file upload on safari, which really bothered me because my code worked perfectly as it should on
This is oldish question, but ... hack-type workaround is below.
Just remove multiple attribute for Safari, turnig it into MSIE<=9 little brother (non-XHR).
Rest of browsers will not be affected.
When Safari finally fixes problem, all you have to do is remove this hack::code and go back to standard input code.
here is standard input sample:
jQuery solution:
Just place it somewhere on a page, where you have files input tag.
you may read more here: How to detect Safari, Chrome, IE, Firefox and Opera browser?
$(document).ready(function () { if (Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor')>0); $('.fileupload-input').removeAttr("multiple"); });
PHP solution
you will need some code to id browser I used a class I got one in github (MIT) get it here: https://github.com/gavroche/php-browser
$files = ''; if (Browser::getBrowser() === Browser::SAFARI) { $files = ''; } echo $files
That is all.