title: how to save image in ftp server in c#?
body: <p>how to save stream data as image in ftp server?</p>
  
  <pre><code> FileInfo fileInf = new FileInfo("1" + ".jpg");
                          string uri = "ftp://" + "hostip//Data//" + fileInf.Name;
                          FtpWebRequest reqFTP;
  
                          // Create FtpWebRequest object from the Uri provided
                          reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(
                               "ftp://" + "ipaddress//Data//" + fileInf.Name));
  
                          // Provide the WebPermission Credintials
                          reqFTP.Credentials = new NetworkCredential("username",
                                                                "password");
  
                          // By default KeepAlive is true, where the control connection is 
                          // not closed after a command is executed.
                          reqFTP.KeepAlive = false;
  
                          // Specify the command to be executed.
                          reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
  
                          // Specify the data transfer type.
                          reqFTP.UseBinary = true;
  
                          // Notify the server about the size of the uploaded file
                          //reqFTP.ContentLength = fileInf.Length; ???
                          using (var img = Image.FromStream(image))
                          {
                              img.Save(adduser.User_Id + ".jpg", ImageFormat.Jpeg);
                          }
  </code></pre>
  
  <p>can u please tell me.</p>