See this phonegap info.
http://docs.phonegap.com/en/2.4.0/cor...
Dont use base64 for image. There are tons of issues for that.
Specify FILE_URI as the 'Camera.destinationType' when taking picture.
See this phonegap info.
http://docs.phonegap.com/en/2.4.0/cor...
Dont use base64 for image. There are tons of issues for that.
Specify FILE_URI as the 'Camera.destinationType' when taking picture.
Hi, so I think I can use this JS from Phonegap to upload files to my server:
-----------------------------------------------------------------Hello Marina/Katya,
as far as the Phonegap code that I'm considering using in my previous posting, you guys gave me this JS to run to arrange the photos the user just took:
Appery('load_pics').append(' ');
However Neil is saying Dont use base64 for image. There are tons of issues for that. Specify FILE_URI as the 'Camera.destinationType' when taking picture.
so then would my new JS be like this (to arrange my pics):??
Appery('load_pics').append(' ');
Just to be clear. Its phonegaps recommendation NOT to use base64.
Quote From Phonegap
[quote:]
Note: The image quality of pictures taken using the camera on newer devices is quite good, and images from the Photo Album will not be downscaled to a lower quality, even if a quality parameter is specified. Encoding such images using Base64 has caused memory issues on many newer devices. Therefore, using FILE_URI as the 'Camera.destinationType' is highly recommended.
[/quote]
Hi All,
I'm sorry for the delay.
If you don't like use base64 an localStorage you need to use File API: http://docs.phonegap.com/en/2.4.0/cor...
Plugins already included to the project and for Android we have set permission for access to the SD-storage as default. But please check this if isn't (permission WRITE_EXTERNAL_STORAGE).
You may combine answers above with File API for upload files.
I just rewrote the JS (the code that engages the camera phone and displays them on the users screen) to reflect that to this:
Appery('load_pics').append(' ');
with this code, the image the user just took doesnt appear any longer. Only a thin border around an empty space like this screenshot:
before i changed JS code from this it was loading no problem:
Appery('load_pics').append(' ');
is replacing "data.imageDataBase64" to "data.imageURI" (i even tried "file.imageURI" and with that thin border mentioned above didnt even appear) the correct way to rewrite this? or are there other settings in my mapping i would have to change as well?
I also changed the request parameters in the camera service: destinationType from Data URL to File URI and the encodingType from JPEG to PNG.
WHat am I doing wrong here?
Hello Marina/Katya,
any ideas how to get this code right? To make it work for using FILE_URI as the 'Camera.destinationType':?
Appery('load_pics').append(' ');
Hi, working on it.
If you want to set destinationType from Data URL to File URI then everywhere in code we suggested you should use data.imageURI instead of data.imageDataBase64.
Marina, I did. Thats why I'm coming back to this code because the pics are not loading anymore. Please see my previous comments... Hopefully we can figure out what the issue is?? Thanks.