I'm trying to upload pdf file from Salesforce to Quickbooks attachments via Quickbooks API. It works fine with small files, but if file size exceeds 999 bytes, the following error appears:

An application error has occurred while processing your requestSystem Failure Error: Maximum line length limit exceeded

There is no such error, when I try do make such request from Postman.


httpReq.setHeader('Authorization' , 'Bearer ' + accessToken);
String boundary = 'MYBOUNDARY';
httpReq.setHeader('Content-Type' , 'multipart/form-data; boundary=' + boundary);


Content-Disposition: form-data; name="file_content_01"; filename="test first 11/07/2019 .pdf"
Content-Type: application/pdf
<my base-64 encoded file>

This code is run from Apex @future method. Are there some limits on Salesforce-Quickbooks connection or limits on callout length from @future maybe?

Your Answer

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

Browse other questions tagged or ask your own question.