HTML5 Upload fails for multiple files on latest Safari for Windows #363

MCF opened this Issue Sep 1, 2011 · 31 comments


None yet
MCF commented Sep 1, 2011

The current stable Safari for Windows has a bug that causes the upload of multiple files through the HTML5 runtime to fail. Curiously upload through HTML5 still works if only a single file is selected.

The problem seems to be related to the FileList object available through the input element. When more than one file is selected the file sizes are set to 0, the modification time is also set to 0. The resulting upload through the FormData object will upload a zero length (i.e. empty) file.

This bug does not seem to be a web-kit bug as the latest Chrome does not have the same problem.

I've logged an issue with Apple against Safari.

I've also created a basic test case that uses the same technique to upload files that plupload does using HTML5 on Safari. The test case is available here:

(By the way I have not coded the test case to work around this webkit form bug which you may run into the second time you select files using the test)


Ah, I think I may be experiencing this issue. When using Safari Version 5.1 (6534.50) but on a mac. I can upload individual files fine but when I attempt multiple files, the file progress % immediately jumps up to 100% for each file then drops back down to 45% for all but the last file. The files have still uploaded but only half of file is present. (For an image that is)

MCF commented Sep 2, 2011

I haven't seen the problem you are describing with Safari 5.1 (6534.50). Testing on that browser with plupload (from a few weeks ago at least) and the reduced test case I mention above works fine. I was only seeing this issue with the newer build on Windows - Safari 5.1 (7534.50).


Strange, I'm still encountering the problem although it is intermittent. Sometimes it seems fine, then after a reload it starts does the same thing as noted above, 100% immediately then dropping back down again. Any ideas what I could try to figure out what the problem is?

MCF commented Sep 3, 2011

You could try the reduced test cased I mention above. If it doesn't happen with that then it must be something specific to plupload and your configuration of plupload.

Also try out your plupload app with other browsers I guess and look for the same misbehaviour.

@MCF MCF closed this Sep 3, 2011

Ok I have run test case above and the result is:

Single File Upload:

  1. name: Desert.jpg, size: 845941, type: image/jpeg, last modified: Tue Jul 14 2009 07:32:31 GMT+0200 (Central Europe Daylight Time) UPLOAD COMPLETE

Multiple File Upload:

  1. name: Chrysanthemum.jpg, size: 0, type: image/jpeg, last modified: Thu Jan 01 1970 01:00:00 GMT+0100 (Central Europe Standard Time) UPLOAD COMPLETE
  2. name: Jellyfish.jpg, size: 0, type: image/jpeg, last modified: Thu Jan 01 1970 01:00:00 GMT+0100 (Central Europe Standard Time) UPLOAD COMPLETE
  3. name: Koala.jpg, size: 0, type: image/jpeg, last modified: Thu Jan 01 1970 01:00:00 GMT+0100 (Central Europe Standard Time) U

Check out the size value. This is the problem in test case too.


Thanks for the reply. OK, so are you now encountering this issue on a mac too? I've tried in pretty much all other browsers, Safari, Firefox, IE, Chrome and do not encounter any similar issues.


I encounter this issue only on windows and safari.

@MCF MCF reopened this Sep 12, 2011
MCF commented Sep 12, 2011

Sorry, I hate github's "Comment & Close" button. I keep hitting it accidentally when adding comments to a bug. This bug is still open. And I can't find a workaround for this either - so it renders html5 useless on Safari. The only choice seems to be to use another runtime entirely.

jayarjo commented Sep 13, 2011

Do not see it in Safari 5.1 (6534.50) on Mac. I could probably disable multiple file selection for Safari on Windows...

Sniffing... who said we could do without it?..

@jayarjo jayarjo closed this in 3096be3 Sep 13, 2011
MCF commented Sep 13, 2011

Do you really think this issue should be closed? I would think it would be better to leave it open until Apple fixes Safari on Windows and you can re-enable multiple file upload for that browser. The HTML5 runtime is not terribly useful for most users without the ability to select and upload multiple files at once - effectively killing it's use for most people on Safari for Windows.

jayarjo commented Sep 14, 2011

Hmm... you have a point :)

@jayarjo jayarjo reopened this Sep 14, 2011
jayarjo commented Sep 14, 2011

Alas, Safari doesn't have it's own bugtracker.

MCF commented Sep 14, 2011

No but the word on the street is that Apple tracks the number of bug reports for each issue and that helps them decide which to fix first. Feel free to re-report the issue if you'd like:

Free registration for the developer program:

Report an issue:

jayarjo commented Sep 24, 2011

Btw, as I've exposed multi_selection feature, you could use required_features option to fall back to Flash or SilverLight if user comes in with Safari on Windows. HTML5 has got some very powerful upgrades recently to ignore it just because of one buggy browser :|


The problem I am seeing is that if I try to upload a file over 2MB, it fails in Safari 5.1 on a Mac, but not Safari 5.1 on a PC. I can upload the same file with FF7, Chrome 16-dev, IE 9 on my PC.

jayarjo commented Oct 7, 2011

Please more details on the failure, cause it's not a case on wide scale.

MCF commented Oct 20, 2011

The underlying Safari bug is still present with the latest release of Safari for Windows (5.1.1 - 7534.51.22).

ystar commented Nov 7, 2011

The latest release of windows safari (5.1.2-7534.52.7) is still not good.


I would like to confirm that I, too, experience this issue on Safari 5.1.2(7534.52.7) on Windows and the latest build on OS X. Single file upload works...but multi doesn't. Btw, it works perfectly in Chrome on Windows (haven't tested OS X)'s just Safari on both platforms that acts weird. (each of those files should be 100kb or more, fyi)


Edit: Just confirming that I did test on Chrome 16.0.912.75 on OS X and multi-file upload works. So it seems to be a Safari only issue.

Edit 2: I tested with Plupload v 1.5.2 and it works. Now I just have this Safari issue on Windows. Safari on OS X works with multi-upload.


This is what I was doing for a while to work around this...

  $.browser.safari = ( $.browser.safari && /chrome/.test(navigator.userAgent.toLowerCase()) ) ? false : true;
  if ($.browser.safari) {
    var defaultruntimes = 'flash,html5,html4';
  else {
    var defaultruntimes = 'html5,flash,html4';

Thanks so much Robert!

On Sat, May 19, 2012 at 6:41 PM, Robert Brown <


This is what I was doing for a while to work around this...

 $.browser.safari = ( $.browser.safari &&
/chrome/.test(navigator.userAgent.toLowerCase()) ) ? false : true;
 if ($.browser.safari) {
   var defaultruntimes = 'flash,html5,html4';
 else {
   var defaultruntimes = 'html5,flash,html4';

Reply to this email directly or view it on GitHub:
#363 (comment)

Charles Koehl

frahugo commented Sep 23, 2012

This fix breaks multiple file uploads on iOS 6 I think. It looks like the selected images all have the same file name "image.jpg". Maybe a check should be done on the platform.

jayarjo commented Nov 7, 2012

Seems like 5.1.7 doesn't have this issue anymore. Anyone to confirm?

Felix10 commented Nov 10, 2012

Today I tested 5.1.7 on Windows 7 and the bug is still not fixed. With my old notebook with WindowsXP and version 5.0.3 multiple upload works perfectly.


Agree with @frahugo. All images get the same filename "image.jpeg"


So, in effect, only one file gets uploaded, while the rest are discarded


I'm having issues in Safari on Mac even selecting a single file, specifically XML files. (although it works fine in Safari on Windows). Here is my code:

        this.fileUploader = new plupload.Uploader({
            url : this.fileUploadUrl,
            container : 'fileButtonContainer',
            browse_button : 'addFileBtn',               
            runtimes : 'html5,html4',
            multipart : true,
            multipart_params : {
                ParseMimeTypeFromName : 'true',
                ReturnStatusInBody : 'json',
                FileParameterName: 'FileName'
            filters : [
                       {title : "XML files", extensions : "xml"},
                       {title : "Zip files", extensions : "zip"}
                       file_data_name : 'FileName'

I am able to select zip files, but not xml files (they are grayed out and not selectible). Has anyone seen this before? Thanks in advance!

maxaral commented Oct 13, 2014

I had same issue


Hi All, I have the same issue with multiple files in Chrome which I have reported at #1222 . Does anybody of you have similiar experience????? When you try to select multiple items it is always posting first one.


can plupload upload multiple files at once?
for example,I selected 4 files and I want to upload 3 files firstly at once, if there is one file finished then upload the last file

jayarjo commented Nov 22, 2016

I guess now that Apple has dropped Safari for Windows (quite a while ago already), we gotta close this one.

@jayarjo jayarjo closed this Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment