Fix download URL for versions

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/37060/head
Christopher Ng 1 year ago committed by Louis (Rebase PR Action)
parent 55db978090
commit 72e2cabf40

@ -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
Loading…
Cancel
Save