Bill Clanton
Posts: 0
Joined: Wed Apr 23, 2014 2:48 pm

Add Username to a list of photos saved to database

I am in the process of building a photo sharing app. So far i have my camera page working perfectly getting the photo from the camera or local library and saving it to the database. That part is great. So now i want to show those photos in a feed (list) but i want to include the username of the person that submitted it next to the photo. So i need to be able to grab the name from the users collection in the database for each of the photos.

So far i created a hidden user_id field and i am passing that back to a custom REST service that i used elsewhere in the app to just grab information for a specific user based on their id. But in this case it doesn't seem to be working in the loop to grab it with the list of photos.

I have it set to fire the get user info service after the list service is complete, but I don;t think that is correct.

I think that i am like 90% of the way there i'm just missing a final step i think.

Can you help???

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

Add Username to a list of photos saved to database

Hello.

You have to use pointer type for saving your user id in photo collection. You may look here for more information: http://docs.appery.io/documentation/b...
Also you have to use include parametr to retrieve images from collection: http://docs.appery.io/documentation/b...

Bill Clanton
Posts: 0
Joined: Wed Apr 23, 2014 2:48 pm

Add Username to a list of photos saved to database

What is the syntax or setting to pass the current user's id number to the request field? I'm guessing there is some javascript i might need to add there some sort of [value] type wild card. I'm just at a loss as to how to do it.

I'm adding the user's id as a pointer column in my photos collection to take the users's id with the photo they upload.

Thanks for your help.

Bill Clanton
Posts: 0
Joined: Wed Apr 23, 2014 2:48 pm

Add Username to a list of photos saved to database

never mind i found the answer in this post.

https://getsatisfaction.com/apperyio/...

it's working now.

Return to “Issues”