We have users uploading files(content Document) to opportunities. They are able to upload files where the size is greater than 100MB. But salesforce has a heap size limit of 12MB for asynchronous apex. I need to upload these files to AWS s3. I am running into exceeding heap size governor limit when retrieving the file content(contentversion->version Data) which is expected. 1. How can I query chunks of file content using SOQL, so I can upload chunks of 5MB to s3?


You can't do this in Apex. The most reasonable way to handle this would be to download the file from an external source, such as a web browser, Heroku or AWS EB app, etc, then process the upload from there.

|improve this answer|||||

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.