/// <summary>
 /// 初始化
 /// </summary>
 public UploadHelper()
 {
     HttpRequest request = _Context.Request;
     if (request.Files.Count <= 0)
     {
         throw new HttpException(500, "服务器没有获取到上传的文件");
     }
     _PostedFile = request.Files[0];
     _fileInfo = new UploadFileInfo(_PostedFile);
 }
 /// <summary>
 /// 移动临时文件夹文件,到上传文件的子文件夹
 /// </summary>
 /// <param name="filename">文件名</param>
 /// <param name="subFolder">要移动的子文件夹</param>
 /// <returns>返回格式"subFolder/filename"</returns>
 public static string Move(string filename, string subFolder, UploadSuccess onSuccess = null)
 {
     UploadFileInfo _fileInfo = new UploadFileInfo();
     //1.判断文件是否在临时文件夹存在
     if (_fileInfo.ExitsFromTempFile(filename) == false)
     {
         throw new Exception("获取临时文件夹中的文件失败,您可以尝试重新上传");
     }
     //2.从临时文件夹中移动到上传文件夹的子文件夹
     string newFullName = _fileInfo.GetUploadFiles_Sub(subFolder) + "\\" + filename;
     if (File.Exists(newFullName))
     {
         File.Delete(newFullName);
     }
     //3.移动文件
     File.Move(_fileInfo.TempFile + filename, newFullName);
     //4.移动成功,委托处理
     if (onSuccess != null)
     {
         onSuccess();
     }
     //返回路径需要反斜杠
     return subFolder + "/" + filename;
 }