internal static UploadCachedFile GetUploadFileObject(string filename) { if (!string.IsNullOrEmpty(filename) && filename.StartsWith(GxRestPrefix.UPLOAD_PREFIX)) { string fkey = filename.Substring(filename.IndexOf(':') + 1); if (CacheAPI.FilesCache.Contains(fkey)) { string uploadJson = CacheAPI.FilesCache.Get(fkey); UploadCachedFile uploadFile = JSONHelper.Deserialize <UploadCachedFile>(uploadJson); return(uploadFile); } } return(null); }
internal static string UploadName(string uploadFileId) { UploadCachedFile uploadFile = GetUploadFileObject(uploadFileId); return(uploadFile != null ? uploadFile.fileName : string.Empty); }
internal static string UploadExtension(string uploadFileId) { UploadCachedFile uploadFile = GetUploadFileObject(uploadFileId); return(uploadFile != null ? uploadFile.fileExtension : string.Empty); }
internal static string UploadPath(string filename) { UploadCachedFile uploadFile = GetUploadFileObject(filename); return(uploadFile != null ? uploadFile.path : string.Empty); }