I can download from the server but I can't upload to it. It uploads the file but it's an empty file.
This is basically what I'm doing:
QString filename="Data.txt";
QFile file( filename );
file.open(QIODevice::ReadWrite);
file.write("HELLO") ;
QUrl urlup("ftp://127.0.0.1/file.txt");
urlup.setPassword("123");
urlup.setUserName("user");
urlup.setPort(21);
QNetworkAccessManager *nam = new QNetworkAccessManager;
QNetworkRequest requp(urlup);
nam->put(requp,&file);
file.close();
but it's not working; just uploads an empty file.