Image file use in the application

This forum contains topics that were moved from Get Satisfaction
RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Hi,
I have been through various forum topics. However, I am still unclear on how to get the image object through db_file_read_service given by appery. Can someone please guide with a step by step way and some screenshots, if possible?

I am in an urgent need of this functionality. So any help from any corner will be greatly appreciated.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image file use in the application

Post by Evgene Karachevtsev »

Hello RK,

Could you please clarify what have you tried and what exactly doesn't work?
Also please specify have you seen this post, for example:
https://getsatisfaction.com/apperyio/... ?

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Thanks for your reply Evgene, Please find the details as below.

Hi,
I have read through multiple posts regarding this. But I am still not clear on how to map image file returned from the server code into a response variable and display it on a page. I have tried to do following:

  1. Upload the image files in database manually.

  2. From the Database services, choose the db_read_files_service.

  3. In Settings, URL contains https://api.appery.io/rest/1/db/files...

  4. Set the Request headers and Query string with database-id, master-key and file names appropriately.

  5. When I say test, I do get the encoded file which I presume is the image file.

  6. But when I say import response, it gives an error stating it cant do so.

  7. Post that, I am not able to do success mapping for the REST Service.

    Can you please help?

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Hi Evgene,
Were you able to analyze the issue? Please help at the earliest.

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Hi,
Can anyone help out with this issue? Its been sometime since I raised this request.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image file use in the application

Post by Evgene Karachevtsev »

Hello RK,

We are sorry for the radio silence here. We are working on it.
I will let you know when have more information from developers team.

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Thanks for the reply,
I even tried manually converting the image into a base64 format and then updating the value in database. When I retrieve the value and try to map the encodedBase64 format into an Image asset, even that did not work. it is not able to load the image. Is there any other workaround possible?

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

Image file use in the application

Post by Illya Stepanov »

Hello -

Please also show us with screenshots your mapping structure, that you using for base64 format.

Are you saving base64 string locally in client side? Are you sure you're getting the correct string before uploading it using service?

What settings and mapping you're using for uploading base64 string? Please show us mapping that you use for uploading?

Are you getting any errors when invoking upload service in the browser console?

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Hi,
Let me try again explaining my scenario.
I convert image files to base 64 format online manually and save them into database manually. I know that the base 64 string is right, since when I decode it manually again online, it shows the proper image. Now in the appery application, I try to fetch the base 64 format as a string and assign it in "mapping" to the image asset variable. That does not work and it gives the error stating failed to load resource.
During mapping, I try to edit the JavaScript as
Appery("image_component ").attr(" src", base64string);
Even this gives the same error in console.
Will this information help in resolving my issue?

RK
Posts: 0
Joined: Sat May 23, 2015 6:40 pm

Image file use in the application

Post by RK »

Hi,
I hope I can get a response soon to my query.

Post Reply