+ Start a Discussion
Ken KoellnerKen Koellner 

Display an HTML file stored at attachment/file/document inline without download link

If I had a file/document/attachment stored in SF, there is a document link.  What I'd like to do is actually display the contents without a VF page instead.

The file is an HTML document.  I don't think I could use a simple outputText with HTML not escaped as VF is going to put <html> tags around the page.  I'd end up with nested <html> tags which wouldn't work.

What I'd like to do is put the attachment/file/document in an iframe.  But to do that, I'd need a URL to the content of the document and not a download link.

Anyone know if there's a way to do that?
Abhi_TripathiAbhi_Tripathi
Hi Ken,

I suggest if you have that document in static resource then you can do the things according to your requirement.
Then you can create a formula field and then you'll be able to show the image on the detail page.

Go to this post
https://www.salesforce.com/us/developer/docs/pages/Content/pages_resources_reference.htm


Regards,
Abhi Tripathi
Salesforce Certified Devel