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
EnthEnth 

How to work around the maximum HTTP request/response limit of 3Mb

I want to develop an process that pulls documents from an internal, secure, Sharepoint server in the background and makes them available subsequently to our clients via Sites. We can't just serve the files from Sharepoint to the customers as this would break our security model and sharepoint isn't scaled for the number of users we expect.

 

There seems to be two prinicpal options:

1. Store the files on a Cloud based file service, such as Amazon S3.

2. Store the files withing Salesforce.com as Files (preferred but cross-browser rendering issues to overcome).

 

A key challenge with either of these approaches seems to be the governor limit on the max http request/response size of 3Mb. Can anyone advise how they've tackled this before to allow a 5Mb+ file to be pulled down into Salesforce.com ?

AdrianCCAdrianCC

Hello,

 

I would go with 1. the external storage option.

 

For no 2 it seems the service that it's serving files must be configured to split them into pieces for the requests. Donno if that is posible with Sharepoint.

You can also try setting setCompressed() for the HTTPRequest and see if that helps - if the files are very close in size to 3MB and can be be archived eficiently. 

Also be careful that the heap size limit is 6MB and that the 3 MB for requests counts toward that one as well. 

 

Thank you,

Adrian