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

二次信任 提交于 2019-12-06 08:08:35

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/39156467/html-file-input-with-multi-selection-in-uiwebview-not-working-for-videos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!