The primary reason was that I wanted to upload in chunks, so I read the file and divided it into chunks.
RNFS.readFile(fileUri, length, offset, ‘base64’);
similar to the method I described previously, the issue is that it reads the entire file rather than chunks of it, so when I try to read a large file, it stores the entire file in memory and causes me to have memory problems.
In order to save memory and ensure that my enormous video uploads smoothly, I would like to read files in chunks only, and only one chunk at a time store in memory.
Kuldip Pandya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.