Page 1 of 2

app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 4:40 am
by Mike4997955

My app is able to access my database, except for the corresponding image. It shows a broken link symbol when it gets the picture. I wonder if i have the incorrect URL? I'm using the Tiggzi database.

In the data mapping, the url is mapped to the asset of an image. The url i'm testing with is: https://api.tiggzi.com/rest/1/db/file...

the url i got from the database panel: https://api.tiggzi.com/rest/1/db/files/
the file name listed in the DB:1efcadcf-dfb6-4bb0-8516-c507909e81c8.Amethyst.gif
The file i uploaded: Amethyst.gif

What do you think?


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 3:21 pm
by Maryna Brodina

Hello! To get it working you should pass the Database Id parameter (X-Tiggzi-Database-Id) as header. You also need to send X-Tiggzi-Session-Token header.


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 4:21 pm
by Mike4997955

It still doesn't work. here's my screenshots:

Image

Image

What do you think?


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 4:24 pm
by maxkatz

Session token is different from database id. You get a session token when a user logs in: http://help.gotiggr.com/getting-start...


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 5:13 pm
by Mike4997955

OK, that tutorial helped. I created my REST service automatically with Create New Database Services. It looks good.

Image

It still loads everything except the image from the tiggzi database.


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 5:25 pm
by maxkatz

Do you also read the image as binary? It shows how to do it at the very end of the tutorial: http://help.gotiggr.com/getting-start...


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 6:21 pm
by Mike4997955

Yes, I set it to read the binary. And I invoke the service with Page Show.

Here are the screenshots:
Image

Image

Image

Image


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 7:56 pm
by maxkatz

Should base64data be inside the array?


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 8:27 pm
by Mike4997955

I don't know. I'm just following the tutorial, which made it look seperate from the array. I can try adding it to the array.


app is able to access my database, except for the corresponding image

Posted: Mon Sep 17, 2012 8:41 pm
by maxkatz

How does your URL look? To get an email, it has to be URL in this format:
]https://api.tiggzi.com/rest/1/db/file...