iPhone File Upload with HTML

守給你的承諾、 提交于 2019-12-17 23:32:33

问题


Is there any way to use <input type="file"> in Safari on iPhone/iPod Touch? Or is there something similar that I can use inside the browser? I want to upload a photo from the device to my database using the browser.


回答1:


Can't be done with plain XHTML/javascript as Safari does not support uploads. See this previous question for a potential workaround solution to upload photos.




回答2:


This is possible with iOs 6 or greater (http://www.apple.com/ios/whats-new/#safari). The browser renders

<input type="file">

and clicking on "Choose File" prompts the user to take a new photo or choose existing from the photo library.




回答3:


I had the same problem today. The alternative browser iCab Mobile does support file uploads. I got it for my iPad and (at least for me) file upload works fine.



来源:https://stackoverflow.com/questions/5784352/iphone-file-upload-with-html

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