web/remux: fix file saving on ios
This commit is contained in:
parent
2c75c52eb3
commit
2bcc849790
1 changed files with 9 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue