Content Version trigger handler/TDTM to generate public Url for files
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
|Related RIO Education Settings||None|
Introduced in v3.14, this class will run on ContentVersion - AfterInsert/AfterUpdate if ‘Generate Public Url’ = TRUE.
It will generate a public Url via the ContentDistribution if one doesn’t exist (or find the existing one if it does), and then populate it into the ‘Public Url’ field on the ContentVersion.
In other words, when a File is uploaded, and the ‘Generate Public Url’ checkbox on the File is checked, this class will automatically generate a publicly accessible Url for the File, and set it on the ‘Public Url’ field.
It will not generate a new public Url if an existing one was already created.
For example, if the ‘Public Url’ field is cleared, and the ‘Generate Public Url’ is unchecked, then checked back again, it will generate the same Url as before.
In Continuing Education, the Study Offerings (e.g. short courses, workshops, etc.) are listed on the Student Community/Portal. To display images for each Study Offering, a public Url for the image file is required.
Rather than setting up the image Url in Salesforce Classic Mode, this class provides a user-friendly way to load and get Url that can be displayed in the Community.