Beispiel #1
0
 public void PerformAction(string ActionType, string Path)
 {
     if (ActionType == "Download")
     {
         FileExplorerOperations.Download(Path, HttpContext.Current.Request.QueryString.GetValues("Names"));
     }
     else if (ActionType == "GetImage")
     {
         FileExplorerOperations.GetImage(Path);
     }
 }
Beispiel #2
0
 public void Download(string Path)
 {
     if (HttpContext.Current.Request.QueryString.GetValues("Names") != null)
     {
         FileExplorerOperations.Download(Path, HttpContext.Current.Request.QueryString.GetValues("Names"));
     }
     else
     {
         FileExplorerOperations.Download(Path);
     }
 }
Beispiel #3
0
        public void Download(string path, string[] names)
        {
            string physicalPath = GetPath(path);

            for (int i = 0; i < names.Length; i++)
            {
                FileAccessRules FilePermission = GetFilePermission(physicalPath, names[i], true);
                if (!FilePermission.Read || !FilePermission.Download)
                {
                    throw new ArgumentNullException("'" + path + names[i] + "' is not accessible. Access is denied.");
                }
            }
            FileExplorerOperations.Download(path, names);
        }