Upload plugin mobile support
Is it possible to use upload plugin in mobile ?
{
"$schema": "../gen/schemas/mobile-schema.json",
"identifier": "mobile-capability",
"windows": [
"main"
],
"platforms": [
"iOS",
"android"
],
"permissions": [
"upload:allow-download"
]
}
but this gives me an error
Uncaught (in promise) upload.download not allowed on window main, webview main, allowed windows: , allowed webviews: , referenced by
Am i doing something wrong? Or its not implemented yet?
Can you test whether this error still happens in rc ? If so, i'll mark this as an upstream issue since the error makes no sense here (even though i assume the plugin doesn't reallyyy work on mobile apart from this issue)
is there any update on this, it is quite annoying if an app can't do download
Here's the current status for Android:
- Do you want to download into the application specific directory? -> Already works.
- Do you want to use dialog.saveFile as the target path? -> Missing file descriptor conversion like in the fs plugin. Fairly easy to add but requires a tiny bit of kotlin sadly.
- Do you want to write into the Downloads dir without asking for it? -> This one is a bit of a mess. I think on old Android versions it may just work if you add the
WRITE_EXTERNAL_STORAGEpermission but on newer android versions something is missing and i'm getting very mixed results when i try to look it up.
Here's the current status for Android:
- Do you want to download into the application specific directory? -> Already works.
- Do you want to use dialog.saveFile as the target path? -> Missing file descriptor conversion like in the fs plugin. Fairly easy to add but requires a tiny bit of kotlin sadly.
- Do you want to write into the Downloads dir without asking for it? -> This one is a bit of a mess. I think on old Android versions it may just work if you add the
WRITE_EXTERNAL_STORAGEpermission but on newer android versions something is missing and i'm getting very mixed results when i try to look it up.
I want to write to the Downloads, and I am on android 10+, uses different API to write to Downloads folder, namely MediaStore API, and we don't seem to need to ask for it in runtime anymore
just to clarify, the app specific directory is Android/data/com.example.app?
Something that came up in https://github.com/tauri-apps/plugins-workspace/issues/2749 - the plugin currently also (likely) does not support content:// urls.