fix: 401 error in share view open file button (#1495)

pull/1515/head
Andrew Kennedy 2021-08-19 05:35:24 -07:00 committed by GitHub
parent aa52b07bb1
commit 25c8788390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -93,7 +93,7 @@
</a>
<a
target="_blank"
:href="link + '?inline=true'"
:href="inlineLink"
class="button button--flat"
v-if="!req.isDir"
>
@ -239,6 +239,11 @@ export default {
const path = this.$route.path.split("/").splice(2).join("/");
return `${baseURL}/api/public/dl/${path}${queryArg}`;
},
inlineLink: function () {
let url = new URL(this.link);
url.searchParams.set("inline", "true");
return url.href;
},
fullLink: function () {
return window.location.origin + this.link;
},