Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML file input with multi selection in UIWebView not working for videos

I've been having issues with creating an upload form packaged as a native iOS app using UIWebView (Cordova). Problem is that when a video is selected in a element that allows multiple selection. Unlike when only single selection is possible, the selected videos are not "compressed" aka. preprocessed and thus restricted in some way.

When trying to read such a video selected from the photo library using FileReader, the onerror function throws a "ProgressEvent" from the "FileReader" with the following "FileError" with code "1" meaning "NOT_FOUND_ERR".

However it works fine in a normal iOS Safari web view.

I've submitted a bug report to Apple.

Also this issue sounds very similar to an earlier issue where a video selected the same way had zero filesize.

like image 510
Aske Ertmann Avatar asked Dec 07 '25 10:12

Aske Ertmann


1 Answers

Only solution I've found is to skip the multiple option for iOS UIWebView, which is just an unfortunate workaround.

like image 145
Aske Ertmann Avatar answered Dec 09 '25 22:12

Aske Ertmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!