예제 #1
0
 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);
 }
예제 #2
0
        internal static string UploadName(string uploadFileId)
        {
            UploadCachedFile uploadFile = GetUploadFileObject(uploadFileId);

            return(uploadFile != null ? uploadFile.fileName : string.Empty);
        }
예제 #3
0
        internal static string UploadExtension(string uploadFileId)
        {
            UploadCachedFile uploadFile = GetUploadFileObject(uploadFileId);

            return(uploadFile != null ? uploadFile.fileExtension : string.Empty);
        }
예제 #4
0
        internal static string UploadPath(string filename)
        {
            UploadCachedFile uploadFile = GetUploadFileObject(filename);

            return(uploadFile != null ? uploadFile.path : string.Empty);
        }