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
professoreprofessore 

Any alternative to base64 encoding for creating attachments ?

I have the following problem.  I need to be able to create attachments in salesforce from my client app.  These are mostly Word documents. Many of them have a lot of hi-res images. This means for a typical file size of 3 -4 MB even the most efficient base 64 encoders take 20 + minutes.  If I upload the same file manually to salesforce it takes 20 seconds.

 

Is there any alternative to base64 encoding ?

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

base64 encoding is not that slow, you have some other problem, i was able to base64 encode and upload to salesforce a 4Mb document in a few seconds.

All Answers

SuperfellSuperfell

base64 encoding is not that slow, you have some other problem, i was able to base64 encode and upload to salesforce a 4Mb document in a few seconds.

This was selected as the best answer
professoreprofessore

Yes, I have figured out this myself using an alternative base64 encoder .... thanks !!!!