5 Replies Latest reply on Dec 18, 2014 10:57 AM by nilsheuer

    Unable to get Image data from the content




      We use Jive Api to fetch the data.


      To fetch discussions we use /contents endpoint.


      The problem we are facing is when the content body is having the image data. We receive the HTML in content body. And we use that to render in our application. But the source in the Image is unable to load the image. (It requires Authentication to render the images!)





      "content" : {

            "text" : "<body><!-- [DocumentBodyStart:fe50099a-38e4-46b4-9b84-acc64da33de6] --><div class=\"jive-rendered-content\"><p>Here we go with a jive discussion, We can add an image inline with the text content like this <a href=\"https://sprinklr-dev.jiveon.com/servlet/JiveServlet/showImage/2-1010-2910/chandelier.jpg\"><img alt=\"chandelier.jpg\" class=\"jive-image image-1\" height=\"500\" src=\"https://sprinklr-dev.jiveon.com/servlet/JiveServlet/downloadImage/2-1010-2910/chandelier.jpg\" style=\"height: auto;\" width=\"334\"/></a> Or we can attach it in the attachment section</p></div><!-- [DocumentBodyEnd:fe50099a-38e4-46b4-9b84-acc64da33de6] --></body>",

            "editable" : false,

            "type" : "text/html"



      This is the type of response we get back from the Jive when we fetch some discussion which are having images in the content body. And if we use the link "https://sprinklr-dev.jiveon.com/servlet/JiveServlet/showImage/2-1010-2910/chandelier.jpg" We are unable to fetch the data.


      PS: if we login to the site from the same browser in another window, are able to get the image.


      This issue is critical for our application. And we need to show this image to our users. Regardless of any other kind of login required.


      Any help would be appreciated.






        • Re: Unable to get Image data from the content
          Ryan Rutan

          These are normally questions that should live in the Jive Developers community, so apologies for just seeing it.


          With regards to this, I would recommend the following services:

          • Get Contents Images - see here
            • This will allow you to pass in a contentID to get a list of images for a specific piece of content, along with URLs to those images that are API compliant.  See also, Image entity.
            • Once you have these references, you will need to stitch them into the content after-the-fact or before you render the response to the client.
          • One other option to consider, is to use the Content Editable method, see here.  Which may provide a cleaner markup for marking images.


          I hope one of these items helps.  Unfortunately, this is the only way I can think of working around your system where this issue. =\  I would file this as a ticket in the your support space, and we will look at ways to improve this use-case in future versions of Jive.

          Hope this helps.