2

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.

hfrog713
  • 273
  • 1
  • 5
  • 16
  • This link might be helpful: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/PickinganItemfromthePhotoLibrary.html – RenaissanceProgrammer Oct 16 '13 at 21:18
  • Thanks for the help but from what i understand this is accessing the camera roll from a native iOS app, i am trying to access the camera roll from the browser(safari or chrome) on the iPad. If anyone knows how facebook achieves this please help.... – hfrog713 Oct 17 '13 at 20:30
  • Did you ever figure this out? – grisaitis Jun 20 '19 at 17:06

1 Answers1

0
 <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