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
Reshmi Sangani 5Reshmi Sangani 5 

How to View PDF attachments in Lightning Experience without downloading them?

I created a link for pdfs stored in files on the Opportunity record. When I switch to lightning and click on the link, salesforce is directly downloading them instead of viewing them?
How can I view the pdfs instead of downloading?
Thank you!
Best Answer chosen by Reshmi Sangani 5
VISHAL SARASWATVISHAL SARASWAT
Hi @Reshmi,
This can be actually solved by setting the pdf filetype to 'Execute in Browser' from Setup -> Security Controls -> File Upload and Download Security

User-added image


Hope it helps.

All Answers

VISHAL SARASWATVISHAL SARASWAT
Hi @Reshmi,
This can be actually solved by setting the pdf filetype to 'Execute in Browser' from Setup -> Security Controls -> File Upload and Download Security

User-added image


Hope it helps.
This was selected as the best answer
Reshmi Sangani 5Reshmi Sangani 5
Hello @vishal,

Thank you very much! This setting worked exactly the way I was looking for!
Thank you once again!!