Page 1 of 1

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

Posted: Sun Feb 22, 2015 4:25 pm
by Mark Wong

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?


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

Posted: Mon Feb 23, 2015 12:20 am
by neuronhighway9522

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.


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

Posted: Mon Feb 23, 2015 2:45 am
by Mark Wong

Sorry may you explain more detail?


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

Posted: Mon Feb 23, 2015 3:00 am
by neuronhighway9522

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