Back in Classic we can preview a PDF attachment by plugging in its ID into this URL:
https://DOMAIN.content.force.com/servlet/servlet.FileDownload?file=00PFILEID
Anyone know of a way to do this with Lightning Files? I saw that there is a "Share via Link" that generates an encrypted link that looks like this:
https://DOMAIN.my.salesforce.com/sfc/p/0R0STUFF/a/0R00STUFF/VwjzvENCRYPTEDSTUFFc5UbSzliMqMS6RwB1Om.arM
But this link format is encrypted. They also have a download link that looks like this:
https://DOMAIN.my.salesforce.com//sfc/servlet.shepherd/version/download/068FILEID
But that one downloads instead of opening up a preview.
What I'm looking for is a way to generate the preview URL if I have either the ContentVersionId or the ContentDocumentId on hand, without having to go through that encryption process (inserting ContentDistribution record). This will be used internally and users will be logged in at the time they preview, so there's no need for an externally available encrypted URL.
Thanks