Chris Whitfield
Posts: 0
Joined: Fri Jul 26, 2013 5:31 am

Assign Image in Appery Database to an item ID

Ive created a listing app. Clicking on a list item will take you to a details page. The details page has an image. How do i assign an image to an item ID? Right now, ive uploaded images into the appery database as files but its not clear to me how i then associate that image with a particular ID in the database so it knows what image to load when the user gets to the details page.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Assign Image in Appery Database to an item ID

You could load the image by its name, for example.

Chris Whitfield
Posts: 0
Joined: Fri Jul 26, 2013 5:31 am

Assign Image in Appery Database to an item ID

Would it make sense to create a pointer column that points to an image file? Then i could map the corresponding image? If so, what is the format for info in a pointer column?

im very new to programming so unfortunately I dont know what load the image by its name means...

Appreciate your help!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Assign Image in Appery Database to an item ID

Hello! You can't create link to image file, but you can store file name in corresponding collection column.

Chris Whitfield
Posts: 0
Joined: Fri Jul 26, 2013 5:31 am

Assign Image in Appery Database to an item ID

ok. what type of column would that be?

a pointer? thanks!

Chris Whitfield
Posts: 0
Joined: Fri Jul 26, 2013 5:31 am

Assign Image in Appery Database to an item ID

as a pointer column, under the list service parameters i see:

Photo
colName
_id

mapping that to the image asset doesn't seem to work so maybe it should be different column type?

Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Assign Image in Appery Database to an item ID

Hi Chris,

Just to add. You can load files as files, not as string. Then in collection you would need to add a column to store file name or even its absolute address as it's shown here: http://docs.appery.io/documentation/b...

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

Assign Image in Appery Database to an item ID

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?

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

Assign Image in Appery Database to an item ID

RK,

Sorry, my bad, I missed this reply from you. We'll post an update here, if you don't mind:
https://getsatisfaction.com/apperyio/...

Return to “Issues”