function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nathanael.mnathanael.m 

Opening Salesforce Content images in the browser as opposed to downloading them

If I want to use an image uploaded to Salesforce Content on a Force.com portal, is it possible to have the servlet not set the headers that cause the file to be downloaded as opposed to opened in the browser? This would be beneficial within Salesforce itself as well. All you get now is a thumbnail and you have to download the full version. I just want to click it and see the full version.

 

The servlet below is not terribly useful if you want to use it in an <img> tag. Also applies to videos.

 

http://TheSiteURLGoesHere/sfc/servlet.shepherd/version/download/ContentVersionIDGoesHere

 

Thanks,


Nathanael

Vinita_SFDCVinita_SFDC

Hello,

 

Please make sure that the access level on imgae is public and then query the FullPhotoUrl and display in VF page.

Similarly like this:
<apex:image value="{!User.FullPhotoUrl}" height="120px" width="120px"/>

For detailed example please refer following link:


http://salesforceapexcodecorner.blogspot.in/2012/05/user-photo-not-visible-on-forcecom-site.html