Notify QNAM about the file received size
This commit is contained in:
parent
c2acc37da6
commit
9fedfcdb3d
1 changed files with 4 additions and 1 deletions
|
@ -82,7 +82,10 @@ void FileTransferJob::startTransfer()
|
|||
mDeviceName),
|
||||
QPair<QString, QString>(i18nc("File transfer destination", "To"), mDestination.toLocalFile()));
|
||||
|
||||
mReply = Daemon::instance()->networkAccessManager()->put(QNetworkRequest(mDestination), mOrigin.data());
|
||||
QNetworkRequest req(mDestination);
|
||||
req.setHeader(QNetworkRequest::ContentLengthHeader, totalAmount(Bytes));
|
||||
mReply = Daemon::instance()->networkAccessManager()->put(req, mOrigin.data());
|
||||
|
||||
connect(mReply, &QNetworkReply::uploadProgress, this, [this](qint64 bytesSent, qint64 /*bytesTotal*/) {
|
||||
setProcessedAmount(Bytes, bytesSent);
|
||||
emitSpeed(bytesSent/mTime.elapsed());
|
||||
|
|
Loading…
Reference in a new issue