6

I have a Java web app that connects to Salesforce to pull catalog information, etc. Today, the images on the page that are stored on Salesforce are showing up as broken links. When I visit the link for the image, I'm able to view it.

Using Chrome Tools, I found that the image being returned on the page is of type "text", rather than "image". This problem only occurred after Winter '15 was rolled out to this sandbox. Other sandboxes that are still using Summer '14 are working correctly.

This link works (when logged into SF admin): https://c.cs7.content.force.com/servlet/servlet.FileDownload?file=FILE_ID

This URL does not work: https://c.cs8.content.force.com/servlet/servlet.ImageServer?id=ID&oid=OID

What could be causing this?

2 Answers 2

2

Is this a static resource in your org? Have you activated the "Serve static resources from Visualforce Domain" update? If so I think there was a change in Winter '15 where static resources have to be referenced by using the $Resource global variable. If you look at the release notes on page 215 you can see the information. https://help.salesforce.com/help/pdfs/en/salesforce_winter15_release_notes.pdf

1
  • Thanks for your reply. It's actually stored as a field on a custom object like this: <img border="0" alt="Microsite Logo" src="/servlet/servlet.FileDownload?file=ID">
    – lsnare
    Sep 12, 2014 at 19:22
0

The solution is this: if using the ImageDownload URL, you must be logged in to Salesforce. If using the ImageServer URL, you can access images without being logged in, but you have to specify an object ID and org ID.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .