Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:53:34+00:00 2026-05-24T10:53:34+00:00

I have Phonegap mobile app and I am using Camera API to capture picture

  • 0

I have Phonegap mobile app and I am using Camera API to capture picture using this code:

navigator.camera.getPicture(function(data){
  $.post('http://www.example.com', {data:data});
}, function(msg){alert(msg);}, { quality: 20 });

This would be OK, but there is need to set the quality option to some reasonable value depending on mobile device used. Some can handle values higher than 70, but low-end devices have troubles even with the value of 20. Phonegap documentation mentions these problem, that they are caused by memory needed since the whole picture is stored in Base64 string. Phonegap suggests to rather specify option destinationType: Camera.DestinationType.FILE_URI

But as far as I understand this, I would get local filepath of the stored picture, which I would have to read it into one variable using FileReader API. And then $.postit again the same way as I am doing right now.

To me, it seems, that if I would change the destinationType from Base64 to FILE_URI, I wouldn’t gain anything and still have the same memory issues when reading it from the local file to variable and POSTing it.

Is my thinking right ? Or am I missing something and there would be some advantage of using FILE_URI destionationType ? Or is there a better way how to upload taken picture ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:53:35+00:00Added an answer on May 24, 2026 at 10:53 am

    OK, so the new 1.0.0 Phonegap documentation answer just this question. It can be found at: http://docs.phonegap.com/phonegap_file_file.md.html#FileTransfer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a Android app using Jquery Mobile/Phonegap. I have the following code
I'm diving into writing a mobile app with jQuery Mobile/PhoneGap. I'm using this sample
I'm using phonegap to create mobile app. I don't want to have everything in
I am developing an app using phonegap for Android. I want this mobile application
I have been using phonegap.js with jqm to built a mobile android app. I
I'm making an PhoneGap app using Jquery Mobile, but I have a little problem
I have this situation - PhoneGap app running in Android. It uses external API
I have mobile app written in HTML5 using PhoneGap. Some parts of the app
I have a mobile app that I developed using PhoneGap (and html/css/javascript) and there
I have a simple Android App using simple js, jquery mobile and phonegap that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.