//github.com/skuid/SamplePages/tree/master/Salesforce_Advanced/Content_Document
I added “PDF” as an option, but it does not preview the uploaded PDF. See attached.
How can this be done?
//github.com/skuid/SamplePages/tree/master/Salesforce_Advanced/Content_Document
I added “PDF” as an option, but it does not preview the uploaded PDF. See attached.
How can this be done?
PDF won’t work as a direct Image link, but never fear. I looked into this a while ago. Salesforce automatically creates a few ThumbNail “Renditions” of content document files. (See this stack exhange post ).
Change the URL in the modal as follows and I think Image files and PDF files will show a thumbnail. (And maybe other files as well…)
<img src="/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB240BY180&versionId={{{LatestPublishedVersion.Id}}}&operationContext=CHATTER&contentId={{{Id}}}"/>
The options for rendition include:
Use the size that works for you.
I think I updated that sample page about a month ago - but probably only updated the “Content Library” tab.
Thanks, Rob. I want to confirm that I am replacing the following:
With this
``
````
``
`It looks like there were some other changes.```
``
`Cheers,```
Bill Fox
Hrmm… somthing happend with your image preview… Can you try again?
Try again. I want to confirm that I am replacing the following:
<img src="/sfc/servlet.shepherd/version/renditionDownload?rendition=
Hrmm... somthing happend with your image preview.... Can you try again?
&versionId={{{ContentDocument.LatestPublishedVersion.Id}}}&operationContext=CHATTER&contentId={{{ContentDocumentId}}}" />
With this
<img src="/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB240BY180&versionId={{{LatestPublishedVersion.Id}}}&operationContext=CHATTER&contentId={{{Id}}}"/>
It looks like there were some other changes.
Cheers,
Bill Fox
I’m not sure if this is helpful, but we view PDFs, images, anything really, using the following code, where {{{Id}}} is the Id of a Salesforce file attachment:
<embed src="/servlet/servlet.FileDownload?file={{{Id}}}" width="100%" height="800px"/>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.