jQuery-File-Upload icon indicating copy to clipboard operation
jQuery-File-Upload copied to clipboard

iOS reports 0 bytes when uploading small .mov file

Open deJong-IT opened this issue 12 years ago • 8 comments

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')

deJong-IT avatar Oct 01 '13 11:10 deJong-IT

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).

blueimp avatar Oct 01 '13 14:10 blueimp

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 :)

deJong-IT avatar Oct 01 '13 14:10 deJong-IT

Ipad 3 Running IOS 7.0.2 having same issue

minimaliszmz avatar Oct 02 '13 14:10 minimaliszmz

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).

ericcoopey avatar Oct 04 '13 00:10 ericcoopey

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.

blueimp avatar Oct 04 '13 00:10 blueimp

We just confirmed the same fix by removing "multiple" in plupload 2.0 - videos will now load (singly) correctly in iOS 7.

kenmeyers avatar Oct 05 '13 03:10 kenmeyers

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.

scaryguy avatar Aug 22 '14 15:08 scaryguy

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")

christiangenco avatar Sep 05 '14 22:09 christiangenco