Skip to content

Instantly share code, notes, and snippets.

View Ko-Sit's full-sized avatar
:octocat:
Focusing

Konstantin Sitkin Ko-Sit

:octocat:
Focusing
  • Warsaw
View GitHub Profile
@aptkdev
aptkdev / ApexFileUpload.cls
Created February 15, 2018 11:54
Apex File File Upload (Using ContentVersion)
/*
* @class FileUploaderClass
* @desc Lets you uplaod a file in Salesforce by giving a base64 string of the
* file, a name for the file, and the Id of the record that you want to attach
* the file to.
*
* @example:
* FileUploaderClass.uploadFile(myBase64String, 'Invoice.pdf', '906F0000000kG2UIAU')
*/
public class FileUploaderClass {