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
Bruce_DoBruce_Do 

EncodingUtil.base64Encode increase the file size, how to prevent?

Hi all, I'm writting a API to transfer a file to external system. In this API I will callout to other service using Http. As you all know, the HTTP request body is limit 6MB. So everything that increase the request body is very important and need to prevent.
But, when I using EncodingUtil.base64Encode to convert a file as Blob to String (as a service request). The file size increase too much. I upload a file has 1075359 bytes, but after encode it increase to 1433812
Do you know how can I prevent this. Thank.