0

What I need to achieve:

  1. Upload files (called as supporting documents) through Lightning Components
  2. Send these files to external system using REST API
  3. Receive updated/signed copy of the files from external system - For this suggested to keep the links in Salesforce records since the files are already stored in FTP, do not want to keep same files in 2 locations. Also, some day the file storage limit in Salesforce will be hit.

The size of supporting documents is 2-50 MB, signed copy is ~40MB on an average.

I have done good search on the forum and I am unable to get concrete answers/approaches for 1 & 2.

Any suggestions/advise on solution approach is greatly appreciated.

0

All I can say here is, Apex has a maximum heap size much too small to handle 40 MB files. So that rules out anything mediated by Apex.

For 1, the lightning:fileUpload Base Lightning Component can handle large files and associate them directly to Salesforce records.

For 2... you want Salesforce to send these files to an external system's REST API? Nope forget it. You'll hit the heap limit. However the external system - or a machine in the middle - could pull the file from Salesforce by API.

  • Thanks. fileUpload is still in beta, I hope by the time we build it becomes GA. Can you pass me supporting links related to limitations when external systems pulls from Salesforce? – goabhigo Dec 3 '17 at 16:49
  • 1
    It's in beta but AFAIK it's open beta - you can use it in live code. For external systems just read the specs of whichever API you're using. REST API can handle files up to 2GB. – Charles T Dec 3 '17 at 17:41
  • Charles, can you point out the document which says the heap size is 40 MB? I am successful in asking the client to pull the doc from Salesforce, but not able to do the same on the other side - I need to pull the file from their system. Heap size of 6MB (sync) is what I have gone through. – goabhigo Dec 11 '17 at 9:19
  • I never said the heap size is 40 MB. I said Apex has a maximum heap size much too small to handle 40 MB files. So that rules out anything mediated by Apex. – Charles T Dec 11 '17 at 13:02
  • My bad, thanks for clarifying. I remember reading if we use SOAP we can handle file size upto 37.5 MB. – goabhigo Dec 12 '17 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.