在WinForm程序中,怎么实现视频文件的上传到服务器端,能给些启示或代码之类的,谢谢了!

解决方案 »

  1.   

    baidu  webclient 上传
      

  2.   

    /// <summary>目录strSrc到指定目录strDest
      ///  
      /// </summary>
      /// <param name="strSrc">导出的目录</param>
      /// <param name="strDest">指定的目录</param>
      public string Rar(string strSrc, string strDest)
      {
      Process p = new Process();
      string cmd = String.Format("a -en -ep1 {0} {1} ", "\"" + strDest + "\"", "\"" + strSrc + "\"");
      string cmd1 = String.Format("a -en -ap{0} -ep {1}", "新的文件", "\"" + strDest + "\"");
      try
      {
      for (int k = 0; k < 2; k++)
      {
      p.StartInfo.FileName = Application.StartupPath + "\\Rar.exe";
      if (k == 0)
      {
      p.StartInfo.Arguments = cmd;
      }
      else
      {  for (int i = 0; i < 3; i++)
      {
      if (TestG[i] != null)
      {
      if (TestG[i].Paper != null)
      {
      cmd1 = cmd1 + " \"" + 文件 + "\"";
      for (int j = 0; j < Count; j++)
      {
      if (TestG[i].Paper.part(i) != null)
      { cmd1 = cmd1 + " \"" + 文件 + "\""; }
      }
      }
      }
      }
      }  p.StartInfo.Arguments = cmd1;
      }
      p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
      p.Start();
      p.WaitForExit();
      p.Close();  }
      if (Directory.Exists(Application.StartupPath + "\\Temp"))
      {
      Directory.Delete(Application.StartupPath + "\\Temp", true);
      }
      return "压缩完成";
      }
      catch (Exception)
      {
      return "压缩失败";
      }需要windows里的RAR.exe文件 拷贝到工程中
      

  3.   

    http://www.cnitblog.com/hj627/articles/10939.html
    winform上传下载
      

  4.   

    webclient.uploadfile
    或ftpwebrequest上传文件
      

  5.   

    请问函数public string Rar(string strSrc, string strDest)里面的
    TestG[i]是在什么的,能吧代码贴出来吗?