tauri: [bug] Can not download in front end
Describe the bug
in the browser, we can use like this:
const eleLink = document.createElement("a");
eleLink.href = url;
eleLink.download = `${title} - ${artist}`;
eleLink.style.display = "none";
document.body.appendChild(eleLink);
eleLink.click();
document.body.removeChild(eleLink);
to download file in front; but in tauri,this function can not take effect.
Reproduction
No response
Expected behavior
No response
Platform and versions
› OS: Mac OS 12.4.0 X64
› Node.js: 16.14.0
› npm: 8.3.1
› pnpm: 6.32.3
› yarn: 1.22.17
› rustup: 1.24.3
› rustc: 1.61.0
› cargo: 1.61.0
› Rust toolchain: stable-aarch64-apple-darwin
Stack trace
No response
Additional context
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Temporary solution:
Don’t forget to enable dialogs.
Is there any plan for this being added to tauri still? It’s still not working in tauri 1.4 almost one year after it being fixed upstream (it was planned apparently to be added to tauri 1.3). It’s quite a critical issue for us.
On macOS nothing seems to happen at all. No errors in the console, no file is downloaded.
At least not to this locations:
~/It looks like this has been solved upstream. Has that made it into any releases for tauri? Are there any workarounds?
@FabianLars Would be useful to know if this issue is likely to be fixed in the 2.0 release.
it still needs to be implemented in Tauri. wry#530 just made it possible to do so (by adding new apis). 530 by itself shouldn’t have added any behavior changes outside these new apis.