jQuery-File-Upload
jQuery-File-Upload copied to clipboard
iOS reports 0 bytes when uploading small .mov file
Device: iPad 2 OS: iOS 7.0.2 Browser: Safari & Chrome
When uploading a small .mov file (<1mb) it reports the filesize as 0.00 KB, so it's not possible to upload.
On the demo site it also reports 0.00 KB (besides 'file type not allowed')
Thanks for your report.
This seems to be related to issues #2611 and #2584. Unfortunately, I couldn't reproduce this on the iOS simulator.
However, I could reproduce this on an iPhone running iOS7. I created a reduced test case and the issue is related to the "multiple" property of the file input element: http://fiddle.jshell.net/4BgFm/2/show/ http://jsfiddle.net/4BgFm/2/
It seems that this is a bug in iOS when selecting video files from a dialog which allows multiple selection.
I've marked this as browser bug and submitted a bug report to Apple (https://bugreport.apple.com).
Thanks for your quick response.
As a workarround I'll try to remove the multiple property when the user is on iPad or iPhone.
For the rest, I hope Apple will fix it soon :)
Ipad 3 Running IOS 7.0.2 having same issue
Another report from iPad 3 and iPhone 5 both running iOS 7.02, where .MOV files fail to upload.
I can also confirm that removing "multiple" from the input tag does seem to fix the issue (although you can only upload one, obviously).
Since this is a bug in Apple's iOS and not related to code in jQuery File Upload, please contact Apple with a bug report. Likely they will fix it sooner if more people report in.
We just confirmed the same fix by removing "multiple" in plupload 2.0 - videos will now load (singly) correctly in iOS 7.
I can also confirm that removing multiple in the input tag did the trick.
Just change this:
<input type="file" name="files[]" multiple >
to this:
<input type="file" name="files[]" >
In my cases, I'm checking browser type and showing multiple if it's desktop and not showing it if current browser is safari.
Here's the two-line Coffeescript patch I'm using on http://dbinbox.com until Apple fixes this:
if /(iPad|iPhone|iPod)/g.test(navigator.userAgent)
$("input[multiple]").removeAttr("multiple")