Images from my site shown in list.

I have a Rest Api running on my server. The Service correctly returns the path/filename of the image file on my server. How to I get the list to use my URL instead of the url. I tried Apperyio("imageName").attr("src", "http://myserver/" + PhotoFileName); and it does not work.
1 person has
this question
This topic is no longer open for comments or replies.
  • Hi Racoffell,

    You should form with your response correct URL to this file.

    See details in code:

    //Note you should assign correct URL to this variable.
    var fileUrl = data.PhotoFileUrl;

    //For debug purposes. Copy this link from console and paste to browser search string and you should see correct image.
    console.log("fileUrl = " + fileUrl);

    //Where "listItemName" is your list item component name.
    //Where "imageName" is your image compnent name.
    var imageComponentInAList = element.closest('[name="listItemName"]').find('[name="imageName"]');

    //Set for image component certain fileURL.
    imageComponentInAList.attr("src", fileUrl);

  • (some HTML allowed)
    How does this make you feel?
    Add Image

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated