admin管理员组文章数量:1329040
Is there any way to directly open the Photo Library and select photos when clicking on HTML file control on Safari iOS/WebViewController?
I was able to directly open camera and documents (only on iOS 14 devices) from the file control using the following codes.
To open the camera:
<input type="file" name="media_file" accept="image/*, video/*" capture="environment">
And to open the documents:
<input type="file" name="media_file" accept="application/pdf" >
But couldn't open the Photo Library. Instead it is showing the following menu and from there I have to open the Photo Library to chose photos. But I need to open the Photo Library directly without showing the menu. Is it possible?
Is there any way to directly open the Photo Library and select photos when clicking on HTML file control on Safari iOS/WebViewController?
I was able to directly open camera and documents (only on iOS 14 devices) from the file control using the following codes.
To open the camera:
<input type="file" name="media_file" accept="image/*, video/*" capture="environment">
And to open the documents:
<input type="file" name="media_file" accept="application/pdf" >
But couldn't open the Photo Library. Instead it is showing the following menu and from there I have to open the Photo Library to chose photos. But I need to open the Photo Library directly without showing the menu. Is it possible?
Share Improve this question asked Oct 21, 2020 at 7:43 Dipu RajDipu Raj 1,8944 gold badges33 silver badges39 bronze badges3 Answers
Reset to default 1There isn't a direct way through HTML or JavaScript to force the Photo Library to open directly without presenting the initial choice menu.
Frameworks like Cordova or Capacitor might offer plugins or APIs that allow deeper integration with iOS features. Refer to this Capacitor Camera plugin here.
There is no direct way to bypass the options menu and open the Photo Library directly from an HTML file input. This is a limitation of the browser and operating system's handling of file inputs for security and user experience reasons.
No, it is not possible to bypass the menu and directly open the Photo Library on Safari iOS when clicking an HTML file input control. The menu is a security feature designed by iOS to give users control over their file selection.
本文标签: javascriptHTML5 Select photos directly from Photo Library on Safari iOSStack Overflow
版权声明:本文标题:javascript - HTML5 Select photos directly from Photo Library on Safari iOS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742234499a2437824.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论