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.

File download: Unable to locate file after download

See original GitHub issue
RNFetchBlob
            .config({
              fileCache : true,
              // android only options, these options be a no-op on IOS
          
            })
            .fetch('GET', 'http://117.12.209.52/jdrr_cert_gen/images/image_283.jpg', {
              //some headers ..
            })
            .then((res) => {
              // the path should be dirs.DocumentDir + 'path-to-file.anything'
              console.log('The file saved to ', res.path())
            })

console.log('The file saved to ', res.path()) returns /data/user/0/com.myapp/files/RNFetchBlobTmp_x34fi32dgqgwbthcfrdc8e

I have also used download manager and specific path but unable to loacte file. When i am using download manager, I also get a notification but no image.

React native : 0.56 Mutliple Physical devices used

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:15

github_iconTop GitHub Comments

14reactions
vitorverasmcommented, Feb 26, 2019

I’m facing the same issue but only in iOS device using RNFetchBlob.fs.dirs.DocumentDir as path. The fetch response comes with the correct path but after download i got no file.

EDIT: i’ve solved this by using WRITE_EXTERNAL_STORAGE permission on Android. And using this keys in info.plist for iOS:

<key> UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>

As described here, to enable file sharing in the app Document folder.

1reaction
hisanibrahimcommented, Jul 11, 2019

I was faced same issue, but it solved. Simple solution that worked was

  1. Open App Info from mobile
  2. In Permissions -> Please make sure Storage is ticked
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't find downloaded file - Microsoft Community
Can't find downloaded file. I recently downloaded a file via internet download manager. Its size was over 7Gb. I paused the download the...
Read more >
5 Best Ways to Fix ”Failed to Download File, the File Contents ...
1. Manually Download the Missing File · Transfer the file from your Downloads folder to the path in File Explorer, replacing the old...
Read more >
Fix file download errors - Google Chrome Help
If you get an error message on Chrome when you try to download apps, themes, extensions, or other files, try these fixes.
Read more >
[Solved] Can't Open Downloads Folder in Windows 10
The first thing to do when you see a not responding/inaccessible Downloads folder is to run the System File Checker. The purpose of...
Read more >
Can't locate downloaded files - Apple Community
Open a Finder window. Select your Home folder in the Sidebar on the left. Then open the Downloads folder. The Downloads folder may...
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 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