Http Get Request to obtain Image an Load to BackEnd Services

2 posts, 0 answers
  1. Ewan
    Ewan avatar
    1 posts
    Member since:
    Sep 2016

    Posted 24 Oct Link to this post

    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.

  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 27 Oct Link to this post

    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.

     
Back to Top