flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

can't open downloaded file

Open Roee-Tsur opened this issue 3 years ago • 5 comments

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?

Roee-Tsur avatar Sep 08 '21 10:09 Roee-Tsur

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.

nilotpalkapri avatar Sep 16 '21 05:09 nilotpalkapri

same

bugrevealingbme avatar Oct 04 '21 20:10 bugrevealingbme

This may be duplicate of #525.

Cyp avatar Oct 07 '21 14:10 Cyp

//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"

aravind-b-dev avatar Nov 22 '21 07:11 aravind-b-dev

for those who still face this problem.... try OpenFileX package.

niksanand1717 avatar Mar 29 '24 05:03 niksanand1717