0

We need to build a mobile app that works in offline mode. We can do everything we need to except we need to be able to take pictures (on a phone) and upload them later. It would be cool to add them to the datastore, but most cameras take big pictures now days.

  1. Is it possible to save a picture in the datastore? (javascript?)
  2. Can it be a link to the phone that is uploaded later?

Has anyone done something like this?

Stefan Kendall
  • 64,006
  • 65
  • 247
  • 399
markthegrea
  • 3,351
  • 7
  • 46
  • 70

1 Answers1

0
  1. Access camera on device requires special API. You cannot do it on standard browser (i.e. Mobile Safari/Webkit on iPhone/Android). The API is however is available on frameworks/webView wrappers such as PhoneGap.
  2. Depend on the implementation of such custom API, you might be able to save the output of camera as a file directly, or you might need to save the data as a variable (blob, base64 string, typed array, whatever) in LocalStorage. Need to figure out how to do (1) first.
timdream
  • 5,704
  • 5
  • 20
  • 24