Open adamnator92 opened 6 years ago
The following constants are available on the RNFS
export:
MainBundlePath
(String
) The absolute path to the main bundle directory (not available on Android)CachesDirectoryPath
(String
) The absolute path to the caches directoryExternalCachesDirectoryPath
(String
) The absolute path to the external caches directory (android only)DocumentDirectoryPath
(String
) The absolute path to the document directoryTemporaryDirectoryPath
(String
) The absolute path to the temporary directory (falls back to Caching-Directory on Android)LibraryDirectoryPath
(String
) The absolute path to the NSLibraryDirectory (iOS only)ExternalDirectoryPath
(String
) The absolute path to the external files, shared directory (android only)ExternalStorageDirectoryPath
(String
) The absolute path to the external storage, shared directory (android only)on Android ,you can choose ExternalDirectoryPath
or ExternalStorageDirectoryPath
How to download file to /storage/emulated/
Environment
react: ^16.3.1 react-native: ^0.56.0 react-native-fs: ^2.11.18
Current behaviour
on android set the download file path to
RNFS.DocumentDirectoryPath
, but unfortunately it will only store to android root access directory/data/user/0/com.[appname]/files
.any way i can save the downloaded file to public directory allow user to access from gallery?