When Experience Cloud site users cannot view Files after a mass migration from Attachments to Files, this is caused by the default sharing settings on the migrated File records.
By default, Files in Salesforce are only shared with internal users. When Attachments are migrated to Files, the ContentDocumentLink records that link the files to their parent records retain the original internal sharing settings: ShareType is set to "I" (Internal Only) and Visibility is set to "InternalUsers." These settings make the files invisible to Experience Cloud site users, regardless of the user's license or permissions.
To fix this, you must update the ShareType to "V" (Viewer) and Visibility to "AllUsers" on the ContentDocumentLink records. Because there may be a large number of records to update, this is best done using the Salesforce Data Loader.
For background on Experience Cloud file sharing, see the Additional Resources section.
On the exported .csv file, retain only these field columns: LINKEDENTITYID, CONTENTDOCUMENTID, SHARETYPE, and Visibility. Save the result as a new CSV file.
Update the field column values as follows:
VAllUsersBefore inserting the updated ContentDocumentLink records, you must delete the existing ones to prevent a duplicate error: "Document with ID: 069000000000000 is already linked with the entity with ID: 500000000000000: Linked Entity ID."
Use the ID column from your original exported ContentDocumentLinks CSV file for the deletion.
After the insert completes, verify that Experience Cloud site users can now view the previously invisible files.
000384546

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.