From 70991aebaacad87474c5cfa2fed5fd16fdf45664 Mon Sep 17 00:00:00 2001 From: Andrew Kennedy Date: Wed, 4 Aug 2021 02:28:39 -0700 Subject: [PATCH] Properly handle searchParams This should avoid the pitfalls of trying to manually decide to attach inline=true with a ? or a &. --- frontend/src/views/Share.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue index 4340e8d3..6bdc8748 100644 --- a/frontend/src/views/Share.vue +++ b/frontend/src/views/Share.vue @@ -93,7 +93,7 @@ @@ -239,6 +239,10 @@ export default { const path = this.$route.path.split("/").splice(2).join("/"); return `${baseURL}/api/public/dl/${path}${queryArg}`; }, + inlineLink: function () { + url = new URL(this.link); + url.searchParams.set('inline', 'true'); + return url.href; fullLink: function () { return window.location.origin + this.link; },