[SalesForce] sharing a file via public link

Let's say we have a student object. Under Student Object, we have multiple files attached (such as certifications, etc).

I want to expose public link for each files of each student. So that outside system can consume the file via public link.

1) How can I set public link for files every time file is created dynamically.

Each file for each student should be unique.

Any possible approach for this requirement in Salesforce?

Best Answer

I use this method on our site and customer portal to expose documents. I'd say this should work for attachments as well as long as the sharing setting for the record allow.

<a href="{!URLFOR($Action.Document.Download, recordID )}">Download</a>
Related Topic