Questions tagged [react-native-fs]
165 questions
0
votes
1 answer
Why React Native RNFS's copyFile() cannot access to existing file on iOS?
I'm trying to access and copy a file from "/Documents" folder (on ios simulator) with RNFS but while .exists() can find the file, .copyFile() returns error as "The file 'temp.jpg' doesn't exists"
Why that can happen?
Here is my source file path (and…
![](../../users/profiles/159354.webp)
she hates me
- 771
- 3
- 16
- 39
0
votes
1 answer
TypeError:null is not an object(evaluating 'RNFSManager.RNFSFileTypeRegular')
I am currently working on reading a local file in react-native and am running into the following error,
TypeError:null is not an object(evaluating 'RNFSManager.RNFSFileTypeRegular')
The code I am using is taken straight off of the documentation for…
![](../../users/profiles/11232732.webp)
db1048
- 51
- 2
0
votes
1 answer
how can ı do solve Possible Unhandled Promise Rejection?
react-native: 0.61.2
react-native-fs: ^2.16.2
I want to create a new directory in external storage. I expected "Possible Unhandled Promise Rejection (id: 2): Error: Directory could not be created"
export function createDirCategory(fileName) {
…
![](../../users/profiles/6533295.webp)
görkem
- 25
- 7
0
votes
2 answers
How to read JSON file with React-Native-fs
I have a asset.json file with content, and need to read it within an react-native app.
I already figured that it must be manually copied to the native implementation and I can verify the file is there (and readable: -rw-r--r--).
Since its there and…
![](../../users/profiles/1195266.webp)
Macilias
- 2,132
- 1
- 24
- 35
0
votes
1 answer
react-native local filesystem storage for images
As a learning exercise, I'm writing a react-native-cli based photo application which should work in a offline mode. What I mean is, application provides a way to either take a picture using camera or select a photo from a built-in gallery and stores…
![](../../users/profiles/1044417.webp)
Atarang
- 402
- 1
- 6
- 19
0
votes
1 answer
How to set headers downloading a file using React Native and react-native-fs?
In order to download an asset an Authorization header needs to be set when using react-native-fs with React Native.
Following the documentation the header is set as such:
const options = {
headers: {
Authorization: `Bearer…
![](../../users/profiles/494664.webp)
Adam S
- 468
- 8
- 22
0
votes
1 answer
React-native: How to copy file from ios project folder?
I have files in assets folder which is created in Xcode under my_project/assets.
I can normally access file in my template WebView with:
source={uri:'ICF-Package/ICFPackage/index.html'}
but I can't copy this file to LibraryDirectoryPath with…
![](../../users/profiles/11955230.webp)
Aishwarya R M
- 73
- 7
0
votes
1 answer
How to use moveFile react-native-fs
i need share local image on react native app, use react-native share and react-native-fs. Image is in local folder in root app named 'images'. How to share this image. Do i need copy or move image to temp and use that image for getting absolute…
![](../../users/profiles/10601541.webp)
Ismeet
- 249
- 2
- 11
0
votes
1 answer
Download stream file from server with react-native-fs module in React Native
I want to download file created dynamically from server, the file is created with this config in php
header('Content-Type: "' . $mime . '"');
header('Content-Disposition: attachment; filename="' . $title .".". $ext . '"');
…
![](../../users/profiles/5536966.webp)
Boy Panjaitan
- 19
- 1
- 4
0
votes
0 answers
How to download courses simultaneously on react-native?
I am building a react-native app.The app consists of various courses. These courses are available offline.Using react-native-fs,how can I download 2 or more courses simultaneously?
import { Platform } from "react-native";
import RNFetchBlob from…
![](../../users/profiles/11955230.webp)
Aishwarya R M
- 73
- 7
0
votes
1 answer
Unable to load files from an old version of an app after recompiling it
There is the following problem in my React Native app. The app stored some PDF files as files and was able to access them. Then probably after recompilation the app started having problems accessing those files. However, the files are still there. I…
![](../../users/profiles/5185570.webp)
Peter G.
- 6,748
- 14
- 67
- 134
0
votes
2 answers
DownloadFile with thousands of files is blocking the application interface
I am downloading 15019 images in JPG format with this code:
for (const item of requestUrl) {
const optios = {
fromUrl: item.urlPath,
toFile: item.path,
};
downloadFile(optios).promise;
}
❌ The app interface is getting…
![](../../users/profiles/6034820.webp)
Max Ferreira
- 589
- 1
- 3
- 20
0
votes
1 answer
How to save in local AsyncStorage some text file?
I'm creating a new app with react native that fetch some users from a url.
Next, you can choose one of these users from a list and choose another data. Then you have to select a time.
For example: is like when you have a list of artist, then you…
![](../../users/profiles/11728923.webp)
traker98
- 3
- 1
0
votes
1 answer
How can I bundle .proto files with a React Native app?
I am trying to build an app to communicate with embedded devices using Protocol Buffers with protobuf.js
I want to load the content of .proto files at runtime. The files are pulled from a shared repo and I want to have them bundled with the app at…
![](../../users/profiles/11617290.webp)
Shamwow
- 3
- 1
0
votes
0 answers
React-native-windows unauthorized access error
I am using React-native-windows for creating windows version of react app and i am trying to upload file and then create base64 data of that file.
I am using @foqum/react-native-document-picker to upload file. It's working fine.
And i am using…
![](../../users/profiles/1351387.webp)
Harshit Tailor
- 3,132
- 4
- 24
- 39