Mark Wong
Posts: 0
Joined: Sat Feb 14, 2015 7:47 am

How Users' Profile Pictures return from the Database (filename in storage variable)

I need the App's users to have a profile picture, so I've set up an upload system which allows to users to provide their profile picture, the upload service will return the filename and fileurl. I've stored the filename to my storage variable "ProfilePicturefilename".
Should I user the storage variable as a request name for the read service, or what should I do?
What should be in the response of the read service? What parameters will I need?
(I've read the post and employee always suggest "direct link to the file", is it suitable for this case?

neuronhighway9522
Posts: 0
Joined: Sun Oct 19, 2014 2:42 am

How Users' Profile Pictures return from the Database (filename in storage variable)

Use the tutorial on models and storage to get the piece of code that you need. It will be much faster than sending screen shots.

neuronhighway9522
Posts: 0
Joined: Sun Oct 19, 2014 2:42 am

How Users' Profile Pictures return from the Database (filename in storage variable)

If you follow the tutorial for models and storage, they give an example of using a picture with a list -I found this tutorial very useful for many tips that made my app more user friendly

http://devcenter.appery.io/building-a...

Remember, you have to map it as well.,.. .. Go to the section where it talks about the Database and this section that follows and talks about how to get a picture displayed on the page,....

"Click “Mapping” for the Success event and create the following mapping:
ms_catalog_success_mapping

  1. Click “JS” to the left of the photo parameter and add the following JavaScript code:

    1
    return YOURDATABASE_settings.photo_url + YOURDATABASE_settings.database_id + '/' + value;

    “Save and return.” "

    Goodluck and happy learning

Return to “Issues”