Now I am able to download and write all the content using the readyRead()
m_reply = m_manager->get(m_request);
connect(m_reply,SIGNAL(readyRead()),this,SLOT(readingReadyBytes()));
void zoushoFtpTransfer::readingReadyBytes()
{
file.write(m_reply->read(m_reply->bytesAvailable()));
file.close();
qDebug()<<"size : "<<file.size();
m_isDownloadSccess = true;
}
m_reply = m_manager->get(m_request);
connect(m_reply,SIGNAL(readyRead()),this,SLOT(readingReadyBytes()));
void zoushoFtpTransfer::readingReadyBytes()
{
QFile file(m_localPath);
file.open(QIODevice::writeOnly);
file.write(m_reply->read(m_reply->bytesAvailable()));
file.close();
qDebug()<<"size : "<<file.size();
m_isDownloadSccess = true;
}
To copy to clipboard, switch view to plain text mode
Again there is one more issue, after writing onto file, I am storing all the data for that file in QByteArray.
Its storing in QBytearray till 134459022 of data, after which bad_alloc error is thrown.
Let me know what data type can be used to store all the 318459022 size of data
Bookmarks