Page 3 of 3

Populating an image URL from a REST service

Posted: Mon Nov 10, 2014 3:02 am
by Sunoj Vijayan

I have a project in which I have a rest api to get details and populate it to a list. But in the api the image part has only the name and extension of the image, ex: "a.jpeg". I need to add a url before that like "http://www.abc.com/". But inside mapping I select js in the image part of the list and i add the code

return "http://www.mywebsite.com/album-art/" + value;

in side the function. But its lot loading the images.


Populating an image URL from a REST service

Posted: Mon Nov 10, 2014 11:21 pm
by Yurii Orishchuk

Hi Sunoy,

Please use following code to debug this code:

pre

var url = "http://www.mywebsite.com/album-art/" + value;

//Open browser console and get this url to define if it processed correctly.
console.log("url = " + url);

return url;

/pre

Also please give us screen shot where we can see mapping in which you use this code.

Regards.


Populating an image URL from a REST service

Posted: Wed Nov 12, 2014 12:58 am
by Sunoj Vijayan

Thanks a lot it Worked.