When building file-upload functionality in Salesforce Communities (Experience Cloud), many developers run into a confusing issue: Partner Community Users cannot upload files using lightning-file-upload, even when they have access to the parent object — such as a Case.
This often leads to the common question:
“Do Partner Users actually have access to ContentVersion, ContentDocument, and ContentDocumentLink?”
Let’s break down the full explanation.
Partner Community Users do not have direct access to the objects:
-
ContentVersion
-
ContentDocument
-
ContentDocumentLink
These objects are hidden in the profile/permission set UI, meaning you cannot grant CRUD access directly.
However…
Partner Users can upload files as long as:
-
They have access to the parent record (e.g., Case)
-
The community sharing model allows file visibility
-
The Salesforce system handles ContentDocument & related objects implicitly
But certain org settings or sharing restrictions can still block uploads.
Why File Upload Fails for Partner Users
When a Partner Community User tries to upload a file via <lightning-file-upload>, and nothing happens, the usual reasons are:
1. Missing “Files” Feature Access in Community
Make sure your Experience Site has Files enabled.
Setup → Digital Experiences → Settings → Enable Files
Setup → Community Workspace → Administration → Preferences → Allow File Uploads
2. Parent Record Sharing Issues
Even though Partner Users can’t see ContentDocument objects directly, the platform still requires that:
-
The Partner User has access to the Case record
-
The sharing model allows read/write access
Check the Case sharing rules.
3. Upload Permissions in Guest vs Authenticated Users
Partner Users are authenticated, so guest-user restrictions do not apply.
But if your community includes public pages, those might affect flow navigation.
4. Security Model: Files Require Additional Sharing
When a file is uploaded, Salesforce creates:
-
A ContentVersion
-
A ContentDocument
-
A ContentDocumentLink linking the file to the Case
Even though Partner Users cannot see these objects directly, the system still honors sharing rules.
If the system cannot create the CDL linking to Case, upload stalls silently.
How to Fix File Upload for Partner Community Users
Below are the correct fixes:
1. Ensure the User Has “View Files” Permission
Add via Permission Set:
-
View Content
-
View Files
These are not object-level permissions — Salesforce internally maps them.
2. Ensure They Have Access to the Case
Sharing model:
-
Case should be Private or Controlled by Parent
-
Create a Sharing Rule to allow the Partner role to access Cases
3. Enable Files in Community Builder
Under:
Builder → Settings → General → Enable File Uploads
4. Confirm Your LWC Code Uses the Right Record ID
Example:
If record-id is blank or not accessible → uploads fail.
How Salesforce Handles Files for Partner Users ?
Even though Partner Users cannot see or query ContentVersion or ContentDocument:
-
They can upload files using UI components
-
Salesforce creates ContentDocument & links automatically
-
Users see files via the Case “Files” related list, not via SOQL on Content objects
If you try:
The Partner User will get “Insufficient Access”, which is expected.
Conclusion
Even though Partner Community Users cannot be given direct CRUD access to ContentVersion or ContentDocument, Salesforce automatically manages file-related objects when they upload through lightning-file-upload.
Your job is only to ensure:
-
They have Case access
-
Files are allowed in the community
-
The LWC is correctly configured

Comments
Post a Comment