Page 1 of 1

Uploading Image to the APP DB from Phone Gallery

Posted: Mon Jul 18, 2016 8:18 am
by Anim

Hi,

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

Regards
Animesh


Uploading Image to the APP DB from Phone Gallery

Posted: Mon Jul 18, 2016 10:17 am
by Serhii Kulibaba

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...


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 2:32 am
by Anim

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


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 7:02 am
by Illya Stepanov

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.


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 7:23 am
by Anim

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


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 9:14 am
by Illya Stepanov

Set the needed "sourceType" before applying mapping binding.


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 10:04 am
by Anim

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?


Uploading Image to the APP DB from Phone Gallery

Posted: Tue Jul 19, 2016 11:02 am
by Illya Stepanov

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