Different uri when selected directly from download panel and when selected from download folder from phone.
See original GitHub issue-
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:
- Created 5 years ago
- Reactions:4
- Comments:24 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
Please be resolved!!! 😩 😩 😩