My_Test_Repo/force-app/main/default/classes/MakeProfile.cls

14 lines
607 B
OpenEdge ABL

public with sharing class MakeProfile {
@AuraEnabled
public static string getUrl(String contentVersionId){
try {
system.debug('entered in method');
ContentVersion cv = [SELECT ContentBodyId FROM ContentVersion WHERE Id = :contentVersionId];
system.debug('@@@'+cv);
return 'https://suprnova-dev-ed.develop.file.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId='+contentVersionId+'&operationContext=CHATTER&contentId='+cv.ContentBodyId;
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
}
}