question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android][DownloadManager] Unsupported path DocumentDir

See original GitHub issue

Hi,

It appears that it is impossible to download a file to DocumentDir location. I’m getting an error of type “Unsupported path /data/data/[package]/file/…”

If I do not use the DownloadManager everything works fine.

image

The config object I’m using before fetching :

config = {
        addAndroidDownloads: {
          useDownloadManager: true,
          notification: true,
          path:  RNFetchBlob.fs.dirs.DocumentDir + '/titi.mp4',
          mime: 'video/mp4'
        }
      }

Any ideas ? Thanks !

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

2reactions
Kolosafocommented, Apr 4, 2022

Use RNFetchBlob.fs.dirs.DCIMDir for path not ...dirs.DocumentDir

2reactions
Baterkacommented, Jul 28, 2020

Not working on Android 10 with dirs.DownloadDir

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android][DownloadManager] Unsupported path DocumentDir
Coming soon: A brand new website interface for an even better experience!
Read more >
Unsupported path storage/emulated/0/test - Stack Overflow
DownloadManager on an Android 10 device wil not download to the root of external storage or to your own directory on root of...
Read more >
react-native-fetch-blob - npm
A module provides upload, download, and files access API. Supports file stream read/write for process large files.. Latest version: 0.10.8, ...
Read more >
types/rn-fetch-blob/index.d.ts - UNPKG
149, * RNFetchBlob Blob polyfill, create a Blob directly from file path, ... 217, * XMLHttpRequest.open, always async, user and password not supported....
Read more >
how to download file to external storage for Android 10 using ...
SecurityException: Unsupported path. error while running in an Android 10 device. To provide further context, I have declared ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found