Page 1 of 2

How do I get image from the file database?

Posted: Mon Dec 02, 2013 10:29 pm
by adam griffin

I have followed the documentation for the direct file download. I tested the service it test successful but I'm not sure how I can get a response from the service and tied that response to a image component. Image


How do I get image from the file database?

Posted: Mon Dec 02, 2013 10:35 pm
by Igor

Hello,

Did you follow this tutorial http://docs.appery.io/tutorials/uploa... ?


How do I get image from the file database?

Posted: Mon Dec 02, 2013 10:37 pm
by adam griffin

Thank you. I didnt see this. I will check this out


How do I get image from the file database?

Posted: Mon Dec 02, 2013 11:00 pm
by adam griffin

I tried the tutorial, I'm still not getting a response, I added an alert and its not alerting on response.


How do I get image from the file database?

Posted: Mon Dec 02, 2013 11:32 pm
by Igor

Please check that you use correct service settings.
http://docs.appery.io/documentation/b...
Service URL must be the next:
pre
https://api.appery.io/rest/1/db/files/[fileName]
/pre


How do I get image from the file database?

Posted: Wed Dec 04, 2013 5:30 pm
by adam griffin

I have that but how can I set up the response so I can map it to an image component.


How do I get image from the file database?

Posted: Wed Dec 04, 2013 5:32 pm
by adam griffin

From the picture above you can see I got the request and url working. I need help setting up the response part so I take the retrieved data and set it to display in an image component when I invoke services during page load.


How do I get image from the file database?

Posted: Wed Dec 04, 2013 8:51 pm
by Kateryna Grynko

Hi Adam,

Please take a look at here: http://docs.appery.io/tutorials/uploa...


How do I get image from the file database?

Posted: Wed Dec 04, 2013 9:06 pm
by adam griffin

I looked at this. I still do not understand it. Can you explain what I need to do?


How do I get image from the file database?

Posted: Wed Dec 04, 2013 9:47 pm
by Kateryna Grynko

Adam,

Request parameters are: 'X-Appery-Database-Id', 'X-Appery-Session-Token' and 'encoded'. Add response parameter 'base64data' manually and then map data as you need.