I am trying to upload an image file via FTP in ASP.Net. The image file is uploaded to correct location but when I read or download it, it's corrupt. My code is given below
protected void FTPUpload()
{
    //FTP Server URL.
    string ftp = ConfigurationManager.AppSettings.Get("FTPServer");
    //FTP Folder name. 
    string ftpFolder = "images/logos/";
    //FTP Credentials
    string ftpUsername = ConfigurationManager.AppSettings.Get("FTPUsername");
    string ftpPassword = ConfigurationManager.AppSettings.Get("FTPPassword");
    byte[] fileBytes = null;
    //Read the FileName and convert it to Byte array.
    string fileName = Path.GetFileName(fuLogo.FileName);
    using (StreamReader fileStream = new StreamReader(fuLogo.PostedFile.InputStream))
    {
        fileBytes = Encoding.UTF8.GetBytes(fileStream.ReadToEnd());
        fileStream.Close();
    }
    try
    {
        //Create FTP Request.
        FtpWebRequest request = (FtpWebRequest)WebRequest.Create(ftp + ftpFolder + fileName);
        request.Method = WebRequestMethods.Ftp.UploadFile;
        //Enter FTP Server credentials.
        request.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
        request.ContentLength = fileBytes.Length;
        request.UsePassive = true;
        request.UseBinary = true;
        request.ServicePoint.ConnectionLimit = fileBytes.Length;
        request.EnableSsl = false;
        using (var requestStream = request.GetRequestStream())
        {
            CopyStream(fuLogo.PostedFile.InputStream, requestStream);
        }
        FtpWebResponse response = (FtpWebResponse)request.GetResponse();
        //lblMessage.Text += fileName + " uploaded.<br />";
        response.Close();
    }
    catch (WebException ex)
    {
        throw new Exception((ex.Response as FtpWebResponse).StatusDescription);
    }
}
public static void CopyStream(Stream input, Stream output)
{
    byte[] buffer = new byte[1024000];
    int read;
    while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
    {
        output.Write(buffer, 0, read);
    }
}
Am I missing something? The file is uploaded perfectly but for some reason it gets corrupted.
 
     
    