Direct Download endpoint

This commit is contained in:
Scharel Clemens 2021-02-01 18:35:11 +01:00
parent c68ec1ee57
commit ffe821d8be
2 changed files with 5 additions and 1 deletions

View file

@ -367,7 +367,8 @@ void NextcloudApi::replyFinished(QNetworkReply* reply) {
reply->deleteLater(); reply->deleteLater();
break; break;
case QNetworkAccessManager::PutOperation: case QNetworkAccessManager::PutOperation:
if (false) { if (reply->url().toString().endsWith(DIRECT_DOWNLOAD_ENDPOINT)) {
// TODO
} }
else { else {
emit putFinished(reply); emit putFinished(reply);

View file

@ -27,6 +27,9 @@ const QString LOGIN_FLOWV2_ENDPOINT("/index.php/login/v2");
const int LOGIN_FLOWV2_MIN_VERSION = 16; const int LOGIN_FLOWV2_MIN_VERSION = 16;
const int LOGIN_FLOWV2_POLL_INTERVALL = 5000; 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 class NextcloudApi : public QObject
{ {
Q_OBJECT Q_OBJECT