Skip to content

Instantly share code, notes, and snippets.

@dhaniksahni
Created January 23, 2020 18:52
Show Gist options
  • Save dhaniksahni/bb06108bcb7ba9401cfddb7ff5fe5ae8 to your computer and use it in GitHub Desktop.
Save dhaniksahni/bb06108bcb7ba9401cfddb7ff5fe5ae8 to your computer and use it in GitHub Desktop.
Get File Information for S3 Server
public class S3FileController {
@AuraEnabled
public static string getFileUrl(string record)
{
try
{
List<FileStore__c> files=[SELECT S3ServerUrl__c,FileExtension__c FROM FileStore__c
where Id=:record];
FileStore__c file=files[0];
return file.S3ServerUrl__c;
}
catch(Exception ex)
{
system.debug('ex:'+ex.getMessage());
return '';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment