Multiple file downloads do not work in Safari 6.1 above if the web inspector is not open

So, I have a file upload site that I am developing with the HTML5 chunking feature to upload multiple files. it works fine in Chrome, Firefox, IE (mainly browsers with HTML5 capabilities), as well as in Safari, but recently I am testing it, Safari 6.0.5 works fine, but in Safari 6.1, if I upload several files, some files are 0 bytes. I'm not sure what happened.

When I tested, I upload about 70 files with a total volume of 200 MB, and each file is between 5-8 MB .. so there is no chunking ... But when I check the server, most of the files are 0 bytes (as it never turns out to be downloaded ), except for a few files (possibly 3-5 files)

Is there a difference between Safari 6.0.5 and below, with Safari 6.1?

My code is basically in a nutshell: Javascript will split each file if it is larger than 10 MB / file if it will not be downloaded as is. then PHP will handle the download (standard file upload style move_uploaded_file ()).

function uploadFile(file_blob_chunk, file_name, file_part, total_file_chunk, file_id) { //create a progress bar based on file id (check if it the 0 part, otherwise there will be multiple bar for same file) if(file_part == 0) { progressBar(file_id); } //ajax call for creating multipart data form fd = new FormData(); fd.append("file_for_upload", file_blob_chunk); fd.append("file_id", file_id); fd.append("file_name", file_name); fd.append("file_part", file_part); xhr = new XMLHttpRequest(); xhr.fid = file_id; xhr.fid_name = file_name; xhr.fid_part = file_part; xhr.fid_total_chunk = total_file_chunk; xhr.upload.fid = file_id; xhr.upload.fid_part = file_part; xhr.upload.fid_total_chunk = total_file_chunk; xhr.open("POST", "datas/upload/" + file_name + '/' + file_part, true); xhr.send(fd); 

code wise is something like this ...

any idea what is wrong with safari 6.1?

I check the tmp folder, the tmp file at boot time is 0 bytes.

NOTE. Safari 6.1+. If the web inspector is enabled, each file is loaded correctly, if it is disabled, out of 10 files, only 3 are downloaded, the rest are 0 bytes. what causes this difference?

+7
javascript html5 safari php file-upload
source share
1 answer

There are many topics that discuss the same issue:

problem with input file size in safari for multiple file selection

https://github.com/moxiecode/plupload/issues/363

Any workarounds for error loading multiple Safari HTML5 files?

And the only workaround for this problem is to disable multiple downloads for Safari.

+1
source share

All Articles