Sunoj Vijayan
Posts: 0
Joined: Thu Sep 25, 2014 5:53 am

Populating an image URL from a REST service

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Populating an image URL from a REST service

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.

Sunoj Vijayan
Posts: 0
Joined: Thu Sep 25, 2014 5:53 am

Populating an image URL from a REST service

Thanks a lot it Worked.

Return to “Issues”