Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Uploading Image to the APP DB from Phone Gallery

Hi,

I am looking for a solution to load the image from Phone Gallery directly to the APP DB.

Regards
Animesh

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Uploading Image to the APP DB from Phone Gallery

Hello,

Yes, it is possible to do with Camera service: https://docs.appery.io/docs/cordova-i...
just set a sourceType = PHOTOLIBRARY

More information here:
https://github.com/apache/cordova-plu...

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Uploading Image to the APP DB from Phone Gallery

Hi Sergiy,

Thanks for your reply. I tried editing my camera service[request] but its not editable. Neither I can add any parameters. Please find the screen shot attached. The link you suggested "https://docs.appery.io/docs/cordova-i...". I refer to point 7 which talks about optional parameters. They are not available in by default and also I cannot add them. Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Uploading Image to the APP DB from Phone Gallery

Hi - for jQuery Mobile apps you will need to add your Camera service into the Data tab and open "Before send" mapping window and there you can modify Service request parameters.

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Uploading Image to the APP DB from Phone Gallery

Thanks Illya for quick reply.
I already added camera service to DATA tab. Before mapping I am passing

codevalue = "PHOTOLIBRARY&quot
return value;/code

What I see in the service is "Camera" is static value. I tried to remove it but could not. Please find screenshot attached. Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Uploading Image to the APP DB from Phone Gallery

Set the needed "sourceType" before applying mapping binding.

Anim
Posts: 0
Joined: Fri Jul 03, 2015 10:45 am

Uploading Image to the APP DB from Phone Gallery

Thanks for your reply but from where I can set the sourceType?
This field is non editable.
Are you saying that I should set the value of the local storage and then map that local storage to sourceType?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Uploading Image to the APP DB from Phone Gallery

No, I'm saying that you need first remove mapping binding to the "sourceType" field -- and after that you can change it.

Return to “Issues”