Skip to content

Commit

Permalink
fix: 401 error in share view open file button (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-kennedy committed Aug 19, 2021
1 parent aa52b07 commit 25c8788
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/views/Share.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
</a>
<a
target="_blank"
:href="link + '?inline=true'"
:href="inlineLink"
class="button button--flat"
v-if="!req.isDir"
>
Expand Down Expand Up @@ -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;
},
Expand Down

0 comments on commit 25c8788

Please sign in to comment.