mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Merge pull request #3470 from rullzer/use_ocs_url
If the OCS Share API returns an url use that
This commit is contained in:
commit
b07ab14c31
1 changed files with 5 additions and 2 deletions
|
@ -335,8 +335,11 @@ void ShareDialog::slotSharesFetched(const QVariantMap &reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
QString url;
|
QString url;
|
||||||
|
// From ownCloud server 8.2 the url field is always set for public shares
|
||||||
|
if (data.contains("url")) {
|
||||||
|
url = data.value("url").toString();
|
||||||
|
} else if (versionString.contains('.') && versionString.split('.')[0].toInt() >= 8) {
|
||||||
// From ownCloud server version 8 on, a different share link scheme is used.
|
// From ownCloud server version 8 on, a different share link scheme is used.
|
||||||
if (versionString.contains('.') && versionString.split('.')[0].toInt() >= 8) {
|
|
||||||
url = Account::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString();
|
url = Account::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString();
|
||||||
} else {
|
} else {
|
||||||
QList<QPair<QString, QString>> queryArgs;
|
QList<QPair<QString, QString>> queryArgs;
|
||||||
|
|
Loading…
Reference in a new issue