Fix download URL for versions

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2023-03-06 10:24:31 -08:00 committed by Louis (Rebase PR Action)
parent 55db978090
commit 72e2cabf40
3 changed files with 6 additions and 6 deletions

View file

@ -116,7 +116,7 @@ import { NcActionButton, NcActionLink, NcListItem, NcModal, NcButton, NcTextFiel
import moment from '@nextcloud/moment'
import { translate } from '@nextcloud/l10n'
import { joinPaths } from '@nextcloud/paths'
import { generateUrl } from '@nextcloud/router'
import { generateUrl, getRootUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
export default {
@ -204,9 +204,9 @@ export default {
*/
downloadURL() {
if (this.isCurrent) {
return joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
return getRootUrl() + joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
} else {
return this.version.url
return getRootUrl() + this.version.url
}
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long