From de43a0b7a1023ec5ac9e67a96d083b476fa57f3f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 2 Sep 2012 21:41:11 +0300 Subject: [PATCH] Bypass cache when uploading a torrent file in Web UI (closes #68) --- src/webui/html/upload.html | 32 +++++++++++++++----------------- src/webui/httpconnection.cpp | 5 +++-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/webui/html/upload.html b/src/webui/html/upload.html index 2140f181f..f00f48bfc 100644 --- a/src/webui/html/upload.html +++ b/src/webui/html/upload.html @@ -7,31 +7,30 @@ diff --git a/src/webui/httpconnection.cpp b/src/webui/httpconnection.cpp index 01d9f5ec8..68b0b3257 100644 --- a/src/webui/httpconnection.cpp +++ b/src/webui/httpconnection.cpp @@ -297,7 +297,7 @@ void HttpConnection::respond() { } // Icons from theme - qDebug() << "list[0]" << list[0]; + //qDebug() << "list[0]" << list[0]; if (list[0] == "theme" && list.size() == 2) { #ifdef DISABLE_GUI url = ":/Icons/oxygen/"+list[1]+".png"; @@ -393,6 +393,7 @@ void HttpConnection::respondGlobalTransferInfoJson() { } void HttpConnection::respondCommand(const QString& command) { + qDebug() << Q_FUNC_INFO << command; if (command == "download") { QString urls = m_parser.post("urls"); QStringList list = urls.split('\n'); @@ -434,7 +435,7 @@ void HttpConnection::respondCommand(const QString& command) { const QList& torrents = m_parser.torrents(); foreach(const QByteArray& torrentContent, torrents) { // Get a unique filename - QTemporaryFile *tmpfile = new QTemporaryFile (QDir::temp().absoluteFilePath("qBT-XXXXXX.torrent")); + QTemporaryFile *tmpfile = new QTemporaryFile(QDir::temp().absoluteFilePath("qBT-XXXXXX.torrent")); tmpfile->setAutoRemove(false); if (tmpfile->open()) { QString filePath = tmpfile->fileName();