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

How to display an image from Tiggzi database?

Hi Antonia!

You can create new database service and select Query operation for your db collection. New RESTService with parameter "where" will be created. Parameter "where" has format '{"column_name": "element_value"}'. Service response returns collection data that satisfies entered request.

To use Edit mapping in request parameter "where" you have to map local storage variable or component to parameter "where" and add following JS code:
codereturn '{"column_name": "'+value+'"}';/code
To add this JS code press this button:
Image

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

How to display an image from Tiggzi database?

I found a solution for you.
In the Image upload tutorial server returns filename on download success. It's possible to save filename in local storage variable using JavaScript code.
codesuccess: function(data)
{
// OPTIONAL, this is the file name under which the image was stored in database....
localStorage.setItem('db_file_name', data.filename);
}/code
Filename in database will be stored in local storage variable. You can save it in database collection to reuse it later.

Return to “Issues”