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.

Different uri when selected directly from download panel and when selected from download folder from phone.

See original GitHub issue

screenshot_20180620-194502

  • When I select a file from Downloads straight from the drawer then I get this uri:

content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2FBittrexv1.csv

  • But when I select file from OnePlus 5T/Downloads then I get this uri:

``content://com.android.externalstorage.documents/document/primary%3ADownload%2FBittrexv1.csv`

The first uri crashes the app, I am not able to read from the first uri. The second uri works fine. Can you let me know if I am doing something wrong or know of any fix for this. Thanks

I am selecting the document using this:

DocumentPicker.show(
      {
        filetype: [DocumentPickerUtil.allFiles()]
      },
      (error, res) => {
        console.log(res.uri)
        this.fileuri = res.uri;
      }
    );

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
Eramirez06commented, Nov 6, 2019

i’m having same issue if i pick the doc directly from Download folder the path does not exist so i for that reason i cannot upload file to firebase.

but if i go to my internal storage and i pick the download folder and pick the same folder the uri returned let me upload the file to firebase

this sure only happend in Android, IOS works fine

3reactions
abnnajafcommented, Dec 30, 2019

Please be resolved!!! 😩 😩 😩

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't get URI for selecting any file from download folder in MI ...
I am attaching a fileUtil class that I have been using and it works well till Nougat version. But with oreo and that...
Read more >
Sending the user to another app - Android Developers
One of Android's most important features is an app's ability to send the user to another app based on an "action" it would...
Read more >
How to Specify Where Files Are Downloaded
To select a different download folder location: Click the Chrome menu button (three horizontal bars) at the top right, then select Settings.
Read more >
Working with files - MDN Web Docs - Mozilla
Downloading files to the user's selected download folder. Opening files using a file picker on a web page. Opening files using drag and...
Read more >
Create a Download Task | Download Station
Download immediately : Download the selected files to the default destination ... Download to: Change destination folder and modifies the torrent's URL or ......
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