public ShortCode SaveFile(string rawText, string fileName) { var file = _uploadService.Save(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(rawText), false), fileName); var imgCode = _index.AddFile(System.IO.Path.GetRelativePath(_uploadService.RootPath.FullName, file.FullName), fileName); _index.AddFile(imgCode); return(imgCode); }