From ffe821d8be6110b3075fb43717584ef9164e4cef Mon Sep 17 00:00:00 2001 From: Scharel Clemens Date: Mon, 1 Feb 2021 18:35:11 +0100 Subject: [PATCH] Direct Download endpoint --- src/nextcloudapi.cpp | 3 ++- src/nextcloudapi.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nextcloudapi.cpp b/src/nextcloudapi.cpp index 3dad31f..e1d86d1 100644 --- a/src/nextcloudapi.cpp +++ b/src/nextcloudapi.cpp @@ -367,7 +367,8 @@ void NextcloudApi::replyFinished(QNetworkReply* reply) { reply->deleteLater(); break; case QNetworkAccessManager::PutOperation: - if (false) { + if (reply->url().toString().endsWith(DIRECT_DOWNLOAD_ENDPOINT)) { + // TODO } else { emit putFinished(reply); diff --git a/src/nextcloudapi.h b/src/nextcloudapi.h index 0cf6e78..4dcf353 100644 --- a/src/nextcloudapi.h +++ b/src/nextcloudapi.h @@ -27,6 +27,9 @@ const QString LOGIN_FLOWV2_ENDPOINT("/index.php/login/v2"); const int LOGIN_FLOWV2_MIN_VERSION = 16; const int LOGIN_FLOWV2_POLL_INTERVALL = 5000; +// Diredct Download +const QString DIRECT_DOWNLOAD_ENDPOINT("/ocs/v2.php/apps/dav/api/v1/direct"); + class NextcloudApi : public QObject { Q_OBJECT