function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kostya15kostya15 

Transfer files with size bigger then 3Mb to external services

Hi guys,

 

I need to organize sending files from Salesforce to our self-developed service. The files have to be sent from apex code (trigger).

 

I tried to use HttpRequest class, but failed because of limit of callout request size up to 3Mb. We work with bigger documents. 

 

Do you know is there some way out how Salesforce could transfer files bigger then 3Mb to external services?

 

Any help and ideas are very appreciated.

 

Best regards,

  Kostja

 

 

SuperfellSuperfell

If you control the other end (which it sounds like you do),have your trigger/callout send the documentId to the other service, and have that pull it via the API.

kostya15kostya15

Hi Simon,

 

thank you for your idea. Its great, but it doesn't work for me, because I don't want to provide access to salesforce from this service and charge additional salesforce license for this.

 

I thought if it would be possible somehow:

 

1.) split files to 3Mb peaces, send these peaces and merge them in external service

2.) publish and share files with security key throw Salesforce Sites or visual pages and external service could download them.

 

just an ideas, I don't know how to implement them.

 

Cheers,

  Kostja

AdminBoosterAdminBooster

If you can trigger a workflow instead of using Apex code, you will have a sessionId in the outbound message, that can be used by your third party to callback Salesforce to retrieve your document. This scenario does not require any additional licence

kostya15kostya15

How third party service can use SessionID and DokumentID to retrieve Salesforce document without Salesforce license?

 

Kostja

AdminBoosterAdminBooster

In your outbound message configuration, you chose the user that will provide the sessionId. You can use an existing user that you already use for other interfaces