public String GetInSessionPath(ExternalResourceReference resourceReference, String originalPath) { string file = resourceReference.GetReferenceInformation()["File"]; DBUtils.DBItem dbItem = DBUtils.FindDBItem(file); return(ServerName + "://" + FileUtils.GetRelativePath(Application.BaseFolder, dbItem.Path)); }
public void LoadResource(Guid loadRequestId, ExternalResourceType resourceType, ExternalResourceReference resourceReference, ExternalResourceLoadContext loadContext, ExternalResourceLoadContent content) { LinkLoadContent linkLoadContent = (LinkLoadContent)content; string file = resourceReference.GetReferenceInformation()["File"]; DBUtils.DBItem dbItem = DBUtils.FindDBItem(file); ModelPath linksPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(dbItem.Path); linkLoadContent.SetLinkDataPath(linksPath); content.LoadStatus = ExternalResourceLoadStatus.Success; return; }