Questions tagged [react-native-fs]

208 questions
0
votes
1 answer

How do I push an object to a JSON file with javascript?

So, I have my JSON file: { HomeWork: [] } And I want to push an object: {Title: T, Due: D, Description: Desc} To the JSON file, How should I do that? I am using this right now: async function AddWork(obj)…
0
votes
0 answers

How to access device folder using react native file system

I needed to fetch files from a custom folder I created with my rncamera roll app, I used react-native-fs to access the folder but was not able to get the files even though I correctly specified the folder name, but I get a Possible Unhandled Promise…
Benjamin Ikwuagwu
  • 377
  • 1
  • 9
  • 28
0
votes
1 answer

RNFS.upload gives unexpected end of stream error while I want to send files in the device to my server

I am Using react-native-fs for sending the files I picked by react-native-document-picker. so I make a function and call it when all the required files are selected like the code below. and when I call the function uploadImageReq() I got the…
user10111719
0
votes
0 answers

Saving a files in React-Native using react-native-fs

After writing data to a file using react-native-fs where does the file go? I am able to write the file and view it when i am testing in my local machine using ExternalStorageDirectoryPath in android But when i push my app to play store I am unable…
Aravind Reddy
  • 353
  • 4
  • 18
0
votes
1 answer

photo download in react native iOS is too slow

I need to download 1000s of photos in react native for offline use. I use RNFetchBlob for android and RNFS for iOS to download all photos. for android RNFetchBlob.config({ path: `${Path.path}${fileName}.${type}`, …
RkKhanpuriya
  • 164
  • 1
  • 13
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…
she hates me
  • 1,212
  • 5
  • 25
  • 44
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…
db1048
  • 61
  • 1
  • 4
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) { …
user6533295
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…
Macilias
  • 3,279
  • 2
  • 31
  • 43
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…
Atarang
  • 422
  • 1
  • 6
  • 22
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…
Ismeet
  • 419
  • 5
  • 19
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 . '"'); …
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…
Aishwarya R M
  • 123
  • 1
  • 10
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…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
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…
Max Ferreira
  • 679
  • 1
  • 5
  • 21
1 2 3
13
14