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()); } } }