Questions tagged [react-native-fs]

208 questions
3
votes
4 answers

keep track react-native-fs download progress

Using react-native-fs for download file from url, when download progess percent reached 100%, I will call another function. However, RNFS.downloadFile not keep track the progress correctly. _downloadFile = () =>{ const downloadDest =…
FeelRightz
  • 2,777
  • 2
  • 38
  • 73
3
votes
2 answers

How to access files and folders using react-native-fs library

I am using react-native-fs for file system access. However am unable to access files in ios. Below is the code: RNFS.readDir(RNFS.MainBundlePath) .then((result) => { console.log('Got result', result); return…
HSBP
  • 735
  • 2
  • 8
  • 22
3
votes
0 answers

Check free storage space with RNFetchBlob (VS. RNFS)?

I am currently working on a React-Native project using React-Native-FS (RNFS). It appears that the project is not actively maintained and the developers of RNFS recommend to use React-Native-Fetch-Blob (RNFetchBlob). The latter is kind of satisfying…
3
votes
0 answers

Save an image from URL, store on device, and open image successfully in RN

I'm having difficulty fetching an image from a url, storing the image on a device, and opening/viewing it successfully. I am able to fetch the image successfully (I believe) I transform the image into base64 using Buffer (npm buffer) and save it to…
jackfrost
  • 31
  • 2
3
votes
2 answers

React-native - Populate Image with file path to base64

When I receive a base64 Image from the server I save it to the android file system. Is it possible to give an Image the path to the the base64 to populate the Image. For example, something like this:
Larney
  • 1,674
  • 4
  • 23
  • 47
2
votes
0 answers

How to read Blob as arraybuffer in react-native?

I'm trying to convert Blob data into arraybuffer by using FileReader() but its not working giving me an error saying readAsArrayBuffer() is not implemented. so I search on web and found that this function is not implemented in react-native…
2
votes
1 answer

react-native-fs changes the toUrl itself

my url is => http://180.100.200.202/api/files/upload this is my code uploadFiles({ toUrl: "http://180.100.200.202/api/files/upload", files: files, method: "POST", headers: { Accept: "application/json" }, …
AR Second
  • 582
  • 1
  • 6
  • 25
2
votes
1 answer

I am not able to access contents from External Storage in my React Native App

I am using react-native-fs to build a media player like app but I am unable to access directories outside my project folder, I have added these permissions :
abdemirza
  • 629
  • 4
  • 16
2
votes
1 answer

How to get a stream while a video is being recorded?

I'd like to upload data chunk to server while recording a video(not after recording). I tried to go with react-native-camera or react-native-vision-camera. but as far as I know, recordAsync method only resolves the final version of recorded…
2
votes
1 answer

Handling multiple promises to get the total progress of multiple file downloads

I'm trying to download multiple files using react-native-fs library and show the progress of the download to the user. For a single file download It can be use as the following code. let fileSize = null; let downloadedSize = null; let progress =…
camille
  • 278
  • 1
  • 2
  • 20
2
votes
0 answers

What is the most efficient way of uploading files in React Native?

I'm working on a React Native App which will heavily rely on uploaded images and videos of users. Users will be able to upload a profile picture but can also later on upload short videos (under 1 min) similar to Instagram or Snapchat Stories. I'm…
JonasLevin
  • 1,592
  • 1
  • 20
  • 50
2
votes
1 answer

How to add the config in react-native-fs?

I installed react-native-fs and I followed through the document. I did all the configuration but at the last, they mentioned I should make the changes in MainApplication.java . But configuration is not the same as their document. react-native-fs ==>…
AsZik
  • 621
  • 1
  • 4
  • 20
2
votes
1 answer

Why my code doesn't run after my react-native-ffmpeg promise?

After downloading video and audio, I use react-native-ffmpeg to get the final video file. It works. I want to delete the 1.mp4 and 2.mp4 when I get the final video file. The problem is that the code after await getFinalVideo(path, path1, path2,…
Hidden
  • 31
  • 4
2
votes
0 answers

add headers in columns in react native table using SheetJS js-xlsx

I have convertd and write the xlsx file of my table data. I have used react-native-table component library to create table and use SheetJS js-xlsx library for convert and write the file in xlsx format. I have write the file but i am unable to…
vjtechno
  • 452
  • 1
  • 6
  • 16
2
votes
2 answers

Image stored in react-native-fs doesnt show

I'm trying to save an image to document directory (instead of cache) using react native and react-native-fs library, but instead I get a blank photo. const localPath = (image) => { console.log("Cache directory path is ", image) const…
DTZ
  • 127
  • 1
  • 7