Best Practices for sFiles for Experience Cloud
Required reading if you intend to set up sFiles on a Salesforce community site
Required reading if you intend to set up sFiles on a Salesforce community site
The sFiles uploader component allows experience cloud users to upload files to a designated SharePoint folder. With the sFiles Fall '23 release (1.45), this component can now be configured to allow users to navigate and upload to subfolders within this folder.
sFiles includes two Community specific lightning components in the package: Uploader and List View. The uploader gives Community users the ability upload files directly to a specific record-linked folder in SharePoint. The list view offers a list of all files and folders that the user has permission to view and allows download of files using a secure dynamically generated hyperlink. Both components are built using Lightning Web Components and are designed to work within a record context. This document will cover how to embed each of these components into another Aura component or Lightning Web Component, and what parameters each of these components accept when not used on a record page.
In our Community Setup documentation we recommend using Named Principal authentication. However, sFiles also supports Per User authentication, allowing Experience Cloud users to use their own Microsoft 365 account to access files in SharePoint via sFiles. This document walks through steps to enable Per User authentication in Experience Cloud (Community).
Admins may want to trigger an action after an upload or download has occurred in community. This is now available with the Community_Event__e Platform Event.
Files uploaded using the sFiles API and via community are uploaded asynchronously. As a result, you need to subscribe to an event to get the file Id and other metadata.
sFiles Enterprise comes out-of-box with two components that enables uploading files and listing files and folders in your Experience Sites. Learn how to set it up.
By design, sFiles works out-of-the-box with a page that has a record context. However, with some configuration, you can add sFiles components to a page not related with any objects. This article walks you through steps to make this happen.
With sFiles for Experience Cloud, we enforce Salesforce Sharing Rules. This requires every folder in SharePoint to have a Salesforce Id set. With all new folders, sFiles can automatically set this value by using the "Folder Custom Field Defaults" field in the SharePoint Object Settings Custom Metadata Type field. However, you may have folders preexisting in your SharePoint that you would like to update. While sFiles has no out-of-the-box method that could automatically do this for existing folders, there are two approaches for this type of situation.
If you intend to use the Experience Cloud Wizard, these steps will ensure that SharePoint is configured to accept Salesforce record ids which are required to present files and folders to Experience Cloud users.
Here are some common issues that can cause errors when setting up sFiles in Experience Cloud.
With Summer ’21, sFiles brings full features to Experience Cloud. In order to use this feature, Experience Cloud users must have their own Microsoft 365 account and authenticate as their own user.
The process to be able to write a username, email address, or other user information to SharePoint when a user uploads a file.