Query Image URL

Posted by Rollbase User on 10-Feb-2011 01:06

How can I get the URL of an image from Image Upload? Whenever I query the image field its result is a text/html type. Help please.. thanks.

All Replies

Posted by Admin on 10-Feb-2011 11:34

You can use template token {!my_picture#url} - it should be available from drop-down helper "Select Merge Token"

Posted by Admin on 10-Feb-2011 20:11

Hi Pavel thanks for the reply, sorry I forgot to mention, I'm using a generic page. I need to get the image url from a certain record so that I can display it on my page together with the other fields that I query.

Posted by Admin on 10-Feb-2011 21:53

And how do you identify that record? If you're using LOOP construction you can use similar syntax withing the loop.

Posted by Admin on 10-Feb-2011 22:42

I'm using rbf_selectQuery

Posted by Admin on 10-Feb-2011 22:56

This API brings up raw date without formatting them. For Image field this will be properties.

You can try to parse these properties and create URL in form
https://www.rollbase.com/storage/servlet/Image?c={!customer_id}&fileName={!file_neme}&contentType={!content_type}

But this may be tricky. Easier way would be:
1. Create List View which filters records the way you want
2. Create LOOP template using that view
3. Use #url template token on records in the loop

Posted by Admin on 10-Feb-2011 22:59

You already posted a number of questions. Do you mind if I ask what's your customer name?

Posted by Admin on 10-Feb-2011 23:19

Thanks for the help Pavel, I'll let you know when I'm thru with it. I'm Jesfer, I work for GlobalOne PH w/ sir Albert Castillo.

This thread is closed