IOS save to path results in no file
See original GitHub issueUpon upgrading from 0.10.13 to 0.10.14, saving to a specified file on IOS has stopped working.
let fullPath = RNFetchBlob.fs.dirs.DocumentDir + '/test.txt';
let res = await RNFetchBlob
.config({ path: fullPath })
.fetch('GET', 'https://raw.githubusercontent.com/joltup/rn-fetch-blob/master/.gitignore');
console.warn(fullPath);
console.warn(res.path());
console.warn(res.info());
Under both versions, the first two logs give the same result (something like [...]/Library/Developer/CoreSimulator/Devices/F3CE7938-1974-467C-8183-C1F98AC74CCE/data/Containers/Data/Application/8F3721D5-7CC6-4CEC-8D96-1AB6B4CB26E6/Documents/test.txt
) and the last yields an object with the appropriate information (including status: 200
).
If I navigate to [...]/Documents/
folder when the app is built with 0.10.13, text.txt
exists. However, under 0.10.14, the folder remains empty.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:19
- Comments:20
Top Results From Across the Web
Saved file is gone after recompiling the App - Stack Overflow
Save to NSUserDefaults only the relative path from the Documents Directory (what you append to the getDocumentsURL() NSURL ). So in your case,...
Read more >Use the Files app on your iPhone, iPad, or iPod touch
In the Files app, search or browse for the file that you want. iPhone search results for WIP, the name of a folder...
Read more >Writing data to the documents directory - a free Hacking with iOS
– and it's that all iOS apps are sandboxed, which means they run in their own container with a hard to guess directory...
Read more >Add third-party apps to the Files app on iOS - Microsoft Support
The files you save to the Files app on your iOS device show up automatically, but you'll need to set up other third-party...
Read more >How to save artwork in Illustrator - Adobe Support
Learn about saving your artwork files in Adobe Illustrator. ... Select Preserve Paths to discard transparency effects and reset transparent ...
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 in RN 0.57 and rn-fetch-blob 0.10.15. So when i try to download directly to a file with
path:
it returnsresponse.path()
correctly but there’s no file. I don’t know if i’m doing something wrong 😞 . I’m saving atDocumentDir
on iOS.EDIT: i’ve solved this by using
WRITE_EXTERNAL_STORAGE
permission on Android. And using this keys in info.plist for iOS:As described here, to enable file sharing in the app Document folder.
Reverting to 0.10.13 fixes it and works perfectly for both operating systems for us.