fluttercommunity / fluttercommunity/flutter_downloader
File not saving in private storage without WRITE_EXTERNAL_STORAGE permission
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
**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,
)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.