Skip to content

Instantly share code, notes, and snippets.

@dhaniksahni
Last active January 24, 2020 11:14
Show Gist options
  • Save dhaniksahni/4c1f65343a130640ce9b997ef685205d to your computer and use it in GitHub Desktop.
Save dhaniksahni/4c1f65343a130640ce9b997ef685205d to your computer and use it in GitHub Desktop.
public class S3Controller {
@AuraEnabled
public static FileData GetS3FileUsingFileId(string recordId)
{
String key = '**************';
String secret = '*********************************';
String bucket = 'salesforcecodex';
String host = 's3-us-west-1.amazonaws.com';
String method = 'GET';
AWSService service=new AWSService(key,secret,bucket,method,host);
FileData data=service.GetDocumentUsingFileId(recordId);
return data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment