flutter_downloader
flutter_downloader copied to clipboard
can't open downloaded file
I'm trying to download a file in my flutter app using the Dio plugin.
The downloaded file appears in the download folder on my phone but I can't open it. it doesn't have a mime type.
It's the same for every mime type (jpg, pdf, etc...)
[how the downloaded file looks in the download folder] https://i.stack.imgur.com/JRhmR.png
Can anyone help?
I am also facing similar kind of issue. 1.6.1 was working fine but after 1.7.0 file is getting download in download folder only, custom file path are simply getting ignored.
Simply, file path is fixed to download folder. So, when we are providing custom path and saving it using shared preferences, it is becoming inaccessible due to the wrong file path.
same
This may be duplicate of #525.
//add these lines in your AndroidMainfest.xml file
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
//permission
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
android:requestLegacyExternalStorage="true"
for those who still face this problem.... try OpenFileX package.