Re: Downloading file problem
Hard to say without seeing your code. However, if you do this,
Code:
qDebug() << reply->readAll().length();
// then open file and
file.write(reply->readAll());
You get an empty file because there is no more data to read after the first call to readAll().
Re: Downloading file problem
Generally situation looks like this:
void UpdateMgr::onDownloadingFinished( QNetworkReply* reply )
{
if( reply->error() == QNetworkReply::NoError )
{
qDebug() << "Size of downloaded file:" << reply->size();
qDebug() << "Size of saved file:" << reply->readAll().length();
}
}
Size of downloaded file: 11902976
Size of saved file: 11894784
Why????