MCPcopy Create free account
hub / github.com/bumptop/BumpTop / uploadProgress

Method uploadProgress

trunk/win/Source/BT_JavaScriptAPI.cpp:198–205  ·  view source on GitHub ↗

Progress notifications for sendHttpPostFileUpload()

Source from the content-addressed store, hash-verified

196
197// Progress notifications for sendHttpPostFileUpload()
198void JavaScriptAPI::uploadProgress(qint64 bytesSent, qint64 bytesTotal)
199{
200 // get the filename associated with this upload progress by checking who sent the signal
201 QNetworkReply* signalSender = (QNetworkReply*)QObject::sender();
202 QString fileNameAttr = signalSender->request().attribute(QNetworkRequest::User).toString();
203
204 _page->evaluateJavaScript(QString_NT("updateProgress(\"%1\", %2, %3);").arg(fileNameAttr).arg(bytesSent).arg(bytesTotal));
205}
206
207// terminate any uploads in progress
208void JavaScriptAPI::abortAllUploads()

Callers

nothing calls this directly

Calls 6

attributeMethod · 0.80
evaluateJavaScriptMethod · 0.80
senderFunction · 0.50
toStringMethod · 0.45
requestMethod · 0.45
argMethod · 0.45

Tested by

no test coverage detected