Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile Safari IOS 6 Take a picture

I'm looking into the file upload on IOS6 and know that this is possible with the usual link:

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

Altho, the most tutorials and issues I can find are mostly about the upload function. In my case I need to be able to take a picture inside mobile safari with the build-in camera.

I have set up a page to test this (no code, only the link I posted above), and when I take a picture the app (camera app) crashes without actually saving my picture. Is this normal behaviour? Do I need to add some code to upload the picture first? Altho this last thing doesn't make sence to me, since you need to add an already saved picture to a file upload link.

Any help in this would be greatly appreciated :)

like image 472
Bananam00n Avatar asked Apr 22 '13 13:04

Bananam00n


1 Answers

You should not need anything more in the code to avoid crash. It should work the same as choosing a picture from the library. I have tested this on an iPhone 4S with iOS7 and my Safari crashes too. It does not crash every time if I take a picture with the front facing camera (smaller picture?). It also works if I only load the picture from the photo library.

This is a bug in iOS I think. I managed to go around it by restarting my phone. Sadly there is not much we can do on the web side of things, except inform the user that the feature may be buggy.

like image 131
Mikko Tapionlinna Avatar answered Oct 02 '22 00:10

Mikko Tapionlinna