Hey guys,
I'm trying to upload a simple file to a FTP server, simply. 
Here's what I currently have:
void PMGUI::upload()
{
QString fileName
= QFileDialog::getOpenFileName(this, tr
("Upload Task Log"),
"", tr
("TASK (*.task);;All Files (*)"));
ftp->connectToHost("ftp.******.com");
ftp->login("user", "pass");
ftp->put(file, fileName);
}
void PMGUI::upload()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Upload Task Log"), "", tr("TASK (*.task);;All Files (*)"));
QFile *file = new QFile (fileName);
QFtp *ftp = new QFtp();
ftp->connectToHost("ftp.******.com");
ftp->login("user", "pass");
ftp->put(file, fileName);
}
To copy to clipboard, switch view to plain text mode
This, doesn't work (ftp address, username, and password is correct). What am I doing wrong? Also, is there a simple way to monitor the transfer progression (via QT progress bar)?
Bookmarks