After you upload a file to Salesforce, it is detected by the service running in the background, which uploads a copy of the uploaded file in SharePoint. Next, a link file pointing to that SharePoint location is created in Salesforce. The original file in Salesforce is deleted.