Questions tagged [rn-fetch-blob]
99 questions
1
vote
1 answer
How to copy images from gallery to app’s installation directory in React-native
I want to pick an image from gallery and copy that image to the currently running app’s installation directory using react-native.

Vinay N
- 249
- 1
- 8
- 32
1
vote
1 answer
rn-fetch-blob: How to test upload image
How to mock RNFetchBlob for upload image using jestjs?
Code:
await RNFetchBlob.fetch(
'POST',
'https://www.example.net/api/v1/upload-image',
{
Authorization: 'Bearer token',
'Content-Type': 'application/octet-stream',
},
…

Vasyl Nahuliak
- 1,912
- 2
- 14
- 32
1
vote
2 answers
Download image not working on IOS device - React Native
I implemented functionality for download image in React Native using RNFetchBlob Its Working fine with android but on IOS device it's not working.
Following is my react native code for download functionality.
downloadImg = (url) => {
var that…

Deepali Jadhav
- 540
- 2
- 8
- 18
1
vote
2 answers
How to use fromEvent instead of bindCallback on an object method?
I need to connect rn-fetch-blob's onData callback method to an observable.
As far as I know, this is not an event, fromEventPattern couldn't be used.
I can't see how to use create if this is the solution to my problem.
I have found bindCallback that…
anon
1
vote
2 answers
RNFetchBlob android, first view and then download the image
Is there a way to open an image file (mainly jpeg) with:
RNFetchBlob.android.actionViewIntent(res.path(), item.mime_type);
and then allow to save the image, I'm trying on an emulator Nexus 4 and API 25 but both from the gallery and from the photo…

Nobady
- 1,074
- 2
- 11
- 35
0
votes
0 answers
.XLSX file from a Blob in React Native
I need to generate an .xlsx file from a server response, in React Native. The server response looks like this:
Server response (first log is blob, second log is content type)
I have a fetch, the response comes back successfully (the screenshot) and…

Bangodan
- 1
0
votes
0 answers
How to send formData to rn-fetch-blob
I'm having trouble sending large videos, the readFile method only reads small files, I tried with readStream but I didn't get a satisfactory result, with readFile if the file is smaller than 5mb it reads and sends normally to the middleware. I…
0
votes
0 answers
How can I retrieve the project directory path and utilise it to display an image in a React Native application?
I have a collection of images located in the assets folder within the Android directory, as depicted in the accompanying screenshot.
I would like to utilise those images without relying on the "require" function.
To access the images, you can…

Dhaval Panchani
- 329
- 2
- 8
0
votes
1 answer
RNFetchBlob.android.actionViewIntent not working on android 13
when i try to open file after download everything works fine on iOS and android 12 but when i run app on android 13 this command doesn’t run. I have added all the permissions and also configure this library by following each steps. My react-native…

Arslan Naeem
- 3
- 2
0
votes
0 answers
How to pick an external directory and read its content in react native
I wanted to implement a functionality where user selects an external storage directory and i read and list files in side the seleted directory. I am using react-native-document-picker library to pick the directory.
const per = await…

Ravi
- 165
- 3
- 11
0
votes
0 answers
Pdf in react-native
I'm trying to download a pdf that I receive from an endpoint of an api, when doing the tests via postman and insomnia I receive and can view the PDF file at the same time, but when making this same request, passing the same parameters, in…

João
- 11
- 4
0
votes
0 answers
Pdf Downloaded As Invalid Format In React native using RNFetchBlob
I am trying to download a pdf from the URL. I am using RNFetchBlob to download pdf from URLs. It is also getting downloaded successfully. But it doesn't open. It says invalid format. At first, I thought it might be because I was running in an…

Pratik Chauhan
- 21
- 6
0
votes
0 answers
I need to implement the inApp video download feature same as Netflix,Hotstar,Amazone Prime in React native App?
A couple of months back, I came across a client requirement who wanted to build a feature to download and restrict video files in Android App, just like YouTube, Netflix, Amazon Prime does with us.
The steps need to be implemented is as follows…

Akshay N
- 1
- 1
0
votes
1 answer
How to read/write file has big size in React Native
I'm using rn-fetch-blob library to read/write file base64 in React Native. When I read a file (pdf) have big size (~50Mb), I try using readStream and writeStream method of rn-fetch-blob but I got Error: Out of memory. Anyone give me solution for…

Rino
- 53
- 7
0
votes
0 answers
How to merge downloaded files with rn-fetch-blob in react native?
I have the following code:
const downloadVideo = async (uri: string) => {
var filename = `teste`;
await RNFetchBlob
.config({
fileCache: true,
path: `${RNFS.ExternalDirectoryPath}/downloads/${filename}`,
})
.fetch(
…

AlexsanderSS
- 31
- 6