-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to copy files from internal storage into scoped storage in an external SD card in the Podcasts directory? #52
Comments
Another thing related to this...it seemed like Beyond that though, Any insights on what I'm doing wrong would be greatly appreciated. |
From what I can tell, it is an incompatibility. I will see what I can do. |
@alpha0010 do you think the incompatibility is with react-native-scoped-storage? Or something else is incompatible? |
@alpha0010 follow-up question...the only reason we are using react-native-scoped-storage AND react-native-file-access (assuming react-native-file-access does in fact support scoped storage) is because react-native-scoped-storage has an |
Should be fixed in v2.4.4. I would like to add features from libraries such as |
@alpha0010 it works! I was able to download audio files to the SD card for the first time 🥳 thanks so much for the quick fix! |
react-native: 0.66.1
react-native-file-access: 2.4.3
Platform: Android 11
Bug
I can't seem to copy files from the local device storage into permission-based scoped storage on an SD card.
I'm trying to save to the Podcasts directory, but I've tried many directories on the SD card and get the same failing result.
Details
@alpha0010 sorry as this question involves an additional library (react-native-scoped-storage), and I'm not sure if the problem is some incompatibility between the two. I'm wondering if you could see some obvious mistake I'm making with my process...
I'm trying to copy to the scoped storage "Podcasts" directory on an SD card, but I get an error like follows:
Here's the sequence of steps I'm doing to get there...
First, I requested permission to the SD card Podcasts directory using:
Then, on file download using react-native-background-downloader, I download to origDestination (RNFS.TemporaryDirectoryPath), then try to move it into scoped storage:
However...when I do that I get:
When I use RNFS.TemporaryDirectoryPath or RNFS.DocumentDirectoryPath, I have not been able to find where the file is initially stored by react-native-background-downloader (I might just not know where to look). I have used the Files explorer on the device, and I have used Android File Transfer on my Mac to try to find the files...I also have "show hidden files" enabled and still can't find them.
However, when I use RNFS.DownloadDirectoryPath, I can find the files are successfully downloaded to Internal Storage > Download directory.
In any case, wherever the files are initially downloaded...it seems like according to the error message that react-native-file-access just can't find or write to the SD Card > Podcasts directory.
There must be something fundamental I'm missing about this process...does that make sense, and do you have any advice on how to accomplish this?
The text was updated successfully, but these errors were encountered: