简体   繁体   中英

Accessing Camera Roll from Browser in iOS

I am working on an in-browser web application which needs to upload a user's photo from the camera roll but i can't seem to figure it out.

I have researched this subject and all the answers i am finding state that you can't access the camera roll directly from the browser. I thought this might be true but then i navigated to the Facebook site from Safari on my iPad and realized that i was able to access my camera roll to upload a picture. If the answers I'm finding are true, how is it that the Facebook's in-browser web app accesses my camera roll?

Thanks for the help.

 <input type="file" accept="image/*" >

Closely related to this answer https://stackoverflow.com/a/13489553/9866903 however you do not need the capture="camera" (that directs it to immediately go to the camera). https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM