plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

Does fs plugin even work on android?

Open Grandkahuna43325 opened this issue 9 months ago • 3 comments

As of right now(fs version 2.0.0, tauri version 2.1.1) fs plugin doesn't seem to do anything besides throwing errors, at least for me. I assume I have correct permissions:

    {
      "identifier": "fs:scope",
      "allow": [
        {
          "path": "$DOWNLOAD"
        },
        {
          "path": "$DOWNLOAD/**"
        },
        {
          "path": "$APPDATA"
        },
        {
          "path": "$APPDATA/**"
        }
      ]
    },
    {
      "identifier": "fs:allow-write",
      "allow": [
        {
          "path": "$DOWNLOAD"
        },
        {
          "path": "$DOWNLOAD/**"
        },
        {
          "path": "$APPDATA"
        },
        {
          "path": "$APPDATA/**"
        }
      ]
    },

and correct code

        await copyFile("file.pdf", "file.pdf",  { fromPathBaseDir: BaseDirectory.AppConfig, toPathBaseDir: BaseDirectory.Download});

With this setup I don't get any errors, but I also don't get any files in Downloads directory. Can someone try to copy some file to Downloads directory on android?

Grandkahuna43325 avatar Mar 13 '25 19:03 Grandkahuna43325

It's not completely broken but it doesn't work well, at least if not combined with file dialogs. From the very limited testing i did in https://github.com/tauri-apps/plugins-workspace/issues/1156#issuecomment-2575156381 it looks like by default you can only write into the app specific dirs and for the download/document dirs we may be missing something.

FabianLars avatar Mar 13 '25 20:03 FabianLars

It's not completely broken but it doesn't work well, at least if not combined with file dialogs.

Is there someone working on it?

Grandkahuna43325 avatar Mar 14 '25 07:03 Grandkahuna43325

no

FabianLars avatar Mar 14 '25 13:03 FabianLars