Search code examples
salesforce

Document storage on Salesforce


i have a requirement to make documents available on the salesforce front end, with the two options being uploading the documents directly onto salesforce, or adding links to the documents in salesforce, where clicking on the URL would take the user to the document is located in a SharePoint repository.

Do you know whether adding links to documents on salesforce takes up less storage space than uploading the document directly to salesforce?


Solution

  • Check out my https://stackoverflow.com/a/69265554/313628, especially the bit about cheesy Files Connect movie. At the very least you'll have a new term to Google around for.

    "It depends". Generally yes, storing a record with a stupid text/URL field most of the time will consume 2kB data storage. Storing whole file in SF will consume file size (up to 2 GB)... But of file storage. They're counted separately! Hard to say which one you're more likely to run out of. Check what's your current storage, what's the average count of new accounts/leads/cases//emails/what-have-yous Vs planned file traffic.

    If you go the URL route - will the user be able to click through to SharePoint (or what have you) directly, completely in the browser? Because if you plan to use apex to download a file on the backend and return it to aur a/lwc - you'll be limited by heap size. 6MB max unless you use Continuation-like tricks and go 12MB