Page 1 of 1
Assign Image in Appery Database to an item ID
Posted: Wed Jul 31, 2013 9:47 pm
by Chris Whitfield
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.
Assign Image in Appery Database to an item ID
Posted: Wed Jul 31, 2013 11:03 pm
by maxkatz
You could load the image by its name, for example.
Assign Image in Appery Database to an item ID
Posted: Fri Aug 02, 2013 1:18 am
by Chris Whitfield
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!
Assign Image in Appery Database to an item ID
Posted: Fri Aug 02, 2013 12:19 pm
by Maryna Brodina
Hello! You can't create link to image file, but you can store file name in corresponding collection column.
Assign Image in Appery Database to an item ID
Posted: Sat Aug 03, 2013 12:44 am
by Chris Whitfield
ok. what type of column would that be?
a pointer? thanks!
Assign Image in Appery Database to an item ID
Posted: Sat Aug 03, 2013 12:47 am
by Chris Whitfield
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
Assign Image in Appery Database to an item ID
Posted: Sat Aug 03, 2013 12:57 am
by Alena Prykhodko
Assign Image in Appery Database to an item ID
Posted: Mon Aug 12, 2013 4:46 pm
by Kateryna Grynko
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...
Assign Image in Appery Database to an item ID
Posted: Thu Jul 16, 2015 12:33 am
by RK
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:
Upload the image files in database manually.
From the Database services, choose the db_read_files_service.
In Settings, URL contains https://api.appery.io/rest/1/db/files...
Set the Request headers and Query string with database-id, master-key and file names appropriately.
When I say test, I do get the encoded file which I presume is the image file.
But when I say import response, it gives an error stating it cant do so.
Post that, I am not able to do success mapping for the REST Service.
Can you please help?
Assign Image in Appery Database to an item ID
Posted: Thu Jul 16, 2015 7:04 am
by Evgene Karachevtsev
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/...