Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File not saving in private storage without WRITE_EXTERNAL_STORAGE permission #962

Open
AnkitSuda opened this issue Jun 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AnkitSuda
Copy link

AnkitSuda commented Jun 15, 2024

Describe the bug

The download reaches 100% and stays there indefinitely. I observed that when the download is enqueued, it creates a file in the directory. At 100%, it removes the file and stays stuck at 100% without any error. However, when the WRITE_EXTERNAL_STORAGE permission is granted to the app, the plugin works normally and stores the file. Why WRITE_EXTERNAL_STORAGE permission is required even when saving in private storage?

File is stored in getApplicationDocumentsDirectory().path

To Reproduce

Steps to reproduce the behavior:

  1. Start download in private directory
  2. Download reaches 100% without completion

Expected behavior

Download should be completed and the file should not be deleted.

Screenshots

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Device information:

  • Device: Pixel 6a Emulator
  • OS: Android 9.0 API 28
  • plugin version 1.11.7

Additional context

FlutterDownloader.enqueue(
      url: url,
      savedDir: path.join(((await getApplicationDocumentsDirectory()).path), "offline"),
      requiresStorageNotLow: false,
      fileName: "testfile",
      allowCellular: true,
      saveInPublicStorage: false,
      showNotification: true,
      openFileFromNotification: false,
    )
@AnkitSuda AnkitSuda added the bug Something isn't working label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant