/// <summary> /// /// </summary> /// <param name="element"></param> /// <param name="fileName"></param> /// <returns></returns> private string GetConverterRequestUrl(Element element, string fileName) { string attachementUrl = MetaReader.GetMetaReader().GetMetaUrl(element.Class, element.Id, fileName); string contentUrl = HttpUtility.UrlEncode(attachementUrl); Config config = ConfigManager.GetConfigManager().ConnectorConfig; return(config.ConverterUrl + contentUrl); }
/// <summary> /// /// </summary> /// <param name="element"></param> /// <param name="res"></param> /// <param name="fileName"></param> private void OverwriteAttachementValues(Element element, ConverterResult res, string fileName) { Config cfg = ConfigManager.GetConfigManager().ConnectorConfig; element.ReplaceValues($"{cfg.StringIdentifier}.{cfg.BodyFieldName}", res.Body); element.ReplaceValues($"{cfg.FacetIdentifier}.{cfg.ApplicationFieldName}", res.Application); element.ReplaceValues($"{cfg.StringIdentifier}.{cfg.ApplicationFieldName}", res.Application); element.ReplaceValues($"{cfg.FacetIdentifier}.{cfg.MimeTypeFieldName}", res.MimeType); element.ReplaceValues($"{cfg.StringIdentifier}.{cfg.MimeTypeFieldName}", res.MimeType); string attachementUrl = MetaReader.GetMetaReader().GetMetaUrl(element.Class, element.Id, fileName); element.ReplaceValues($"{cfg.StringIdentifier}.{cfg.UrlFieldName}", attachementUrl); string newId = $"{element.Id}_{fileName}"; element.ReplaceValues($"{cfg.StringIdentifier}.{cfg.UidFieldName}", newId); element.Id = newId; }