From 2bcc849790e38c2a1d074270f882d052f36b02e6 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Sun, 8 Sep 2024 18:59:51 +0000 Subject: [PATCH] web/remux: fix file saving on ios --- web/src/routes/remux/+page.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/routes/remux/+page.svelte b/web/src/routes/remux/+page.svelte index 0d4844e1..5a83d839 100644 --- a/web/src/routes/remux/+page.svelte +++ b/web/src/routes/remux/+page.svelte @@ -4,6 +4,7 @@ import { browser } from "$app/environment"; import { beforeNavigate } from "$app/navigation"; + import { device } from "$lib/device"; import { openURL } from "$lib/download"; import { t } from "$lib/i18n/translations"; import { createDialog } from "$lib/dialogs"; @@ -133,6 +134,14 @@ }); if (render) { + if (device.is.iOS) { + return await navigator.share({ + files: [ + new File([ render ], file.name, { type: render.type }) + ] + }).catch(() => {}); + } + openURL(URL.createObjectURL(render)); } else { console.log("not a valid file");