using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
// Set the transferring options.
gdpictureImaging.SetFtpPassiveMode(true);
gdpictureImaging.SetHttpTransferBufferSize(2048);
if (gdpictureImaging.UploadFileToFTP(@"D:\images\image.jpg", "ftp.com", "/demo/image.jpg", "user", "password", 21) != GdPictureStatus.OK)
{
MessageBox.Show("Uploading failed. Status: " + gdpictureImaging.GetStat() + "\nError: " + gdpictureImaging.GetLastTransferError(),
"Uploading using FTP", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}