From da7834d656c7bf53de5518bc0c5c3da2fc0c3d24 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 15 Dec 2023 13:12:53 +0100 Subject: [PATCH] fix(Import): Request network permissions before import fixes #1475 Signed-off-by: Marcel Klehr --- src/ui/views/ImportExport.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/views/ImportExport.vue b/src/ui/views/ImportExport.vue index 15d73d6449..e744e9ed7f 100644 --- a/src/ui/views/ImportExport.vue +++ b/src/ui/views/ImportExport.vue @@ -106,8 +106,12 @@ export default { alert(e.message) } }, - onTriggerFilePicker() { + async onTriggerFilePicker() { this.$refs.filePicker.click() + if (this.isBrowser) { + const {default: browser} = await import('../../lib/browser-api') + await browser.permissions.request({ origins: ['*://*/*'] }) + } }, async onFileSelect() { const file = this.$refs.filePicker.files[0]