Page 1 of 2

Image file use in the application

Posted: Thu Jul 16, 2015 3:56 am
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.


Image file use in the application

Posted: Thu Jul 16, 2015 6:41 am
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/... ?


Image file use in the application

Posted: Thu Jul 16, 2015 7:01 am
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?


Image file use in the application

Posted: Thu Jul 16, 2015 2:53 pm
by RK

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


Image file use in the application

Posted: Sat Jul 25, 2015 5:37 pm
by RK

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


Image file use in the application

Posted: Sat Jul 25, 2015 6:48 pm
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.


Image file use in the application

Posted: Sat Jul 25, 2015 7:46 pm
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?


Image file use in the application

Posted: Sun Jul 26, 2015 5:05 am
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?


Image file use in the application

Posted: Sun Jul 26, 2015 5:29 am
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?


Image file use in the application

Posted: Sun Jul 26, 2015 5:42 pm
by RK

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