file input size issue in safari for multiple file selection

杀马特。学长 韩版系。学妹 提交于 2019-11-28 10:02:32

IT's a Safari bug. No solution for the moment. here is the test i did http://jsfiddle.net/rHd26/6/

frederic

Workaround for us was to remove multiple option... we got file size of 0, but we also got bad filenames with leading strange character added to the filename. Maybe that is why we get 0 in the size: because the first property (filename) is not split correctly with the presence of that bad character at the end of the filename.

Jeffz

Check this hack.

It explains in detail how to remove multiple option for Safari only, leaving other browsers alone.

Any workarounds for the Safari HTML5 multiple file upload bug?

A variation of this issue also seems to have infected mobile Safari on iOS 7, which just released. If you have a "multiple" file input field, and select a video, then the File API returns a file size of 0. Indeed the jsfiddle at the top of this page, reproduces this.

Selecting one or more photos with the "multiple" option is fine - this only affects videos.

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