I've written my code to upload image using qt for symbian devices, my application was getting success to upload image or xml file on the desktop to the server. But when it testing on nokia 5800, my phone hang and failed to upload image as well as xml file. Below is my code that i've written to upload image:

.................................................. ................................

void MainWindow::sendFileToServer(QString filename)
{

QFile transferedImage(filename);


if (!transferedImage.open(QIODevice::ReadOnly))
{

QMessageBox msgBox;
msgBox.setText("File Not Found");
msgBox.exec();

}


QByteArray arrayImage = transferedImage.readAll();


connection = new QFtp();
connect(connection, SIGNAL(dataTransferProgress(qint64,qint64)),this, SLOT(updateDataTransferProgress(qint64,qint64)));
QObject::connect(connection, SIGNAL(done(bool)), this, SLOT(closeConnection()));

connection->connectToHost(ui->editIPAddress->text());
connection->login("suresh", "suresh");
connection->put(arrayImage, "HASIL.png", QFtp::Binary);

}

.................................................. .................................................
anyone can give me advice and show me what wrong with my code