This is a migrated thread and some comments may be shown as answers.

Http Get Request to obtain Image an Load to BackEnd Services

1 Answer 350 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ewan
Top achievements
Rank 1
Ewan asked on 25 Oct 2016, 02:58 AM

I started testing the Telerik Plataform and trying to build a Hybrid Application with different features as loading images to the BackEnd Services. So far I've managed to load images to Files in the BackEnd Services, but I haven't found documentation or any example to help me get an image generated by an external site as an HTTP GET or POST request.

What i'm trying to accomplish is to send a GET or POST request with different parameters like:

http://externalserver.com/AlreadyExistingImagingApplication/generateImage/?size=300x300&color=RGB&galery=roiboss

This call gives a JPG image as a response. I want to upload the resulting JPG as a File to the BackEnd Service.

Any idea, examples, documentation or help on how can I accomplish this for a Hybrid Application??

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 27 Oct 2016, 11:14 AM
Hi Ewan,

If I understand, you want to first download the image to the mobile device and then upload it to Telerik Platform Backend Services and now you need to know how to perform the download?
Downloads in Cordova apps are performed using the File Transfer core plugin. You can find its documentation here:
Cordova File Transfer Plugin
and download a sample AppBuilder project with this plugin from here:
File Transfer

You can build your parameter string dynamically before calling the download method of the plugin.

Then, you can upload the file to Backend Services using their REST API:
Upload Files in Cordova Hybrid Apps

Regards,
Tsvetina
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
Ewan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or