Created
January 23, 2020 18:52
-
-
Save dhaniksahni/bb06108bcb7ba9401cfddb7ff5fe5ae8 to your computer and use it in GitHub Desktop.
Get File Information for S3 Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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