Я пытаюсь загрузить файл на FTP-сервер с С#. Файл загружается, но с нулевыми байтами.
private void button2_Click(object sender, EventArgs e)
{
    var dirPath = @"C:/Documents and Settings/sander.GD/Bureaublad/test/";
    ftp ftpClient = new ftp("ftp://example.com/", "username", "password");
    string[] files = Directory.GetFiles(dirPath,"*.*");
    var uploadPath = "/httpdocs/album";
    foreach (string file in files)
    {
        ftpClient.createDirectory("/test");
        ftpClient.upload(uploadPath + "/" + Path.GetFileName(file), file);
    }
    if (string.IsNullOrEmpty(txtnaam.Text))
    {
        MessageBox.Show("Gelieve uw naam in te geven !");
    }
}
