forked from wkh237/react-native-fetch-blob
-
Notifications
You must be signed in to change notification settings - Fork 791
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I am trying to stream file data from the local file system, to another slower destination (in my case BLE).
I can't see a way to achieve this using the current API... I need to be able to request the next chunk of data when I am ready for it, which RNFetchBlobReadStream doesn't seem to allow.
I can't see how I can use onData()
to serve this purpose, instead I would need to do something like the following:
let stream = await RNFetchBlob.fs.readStream(path, "base64", 512);
stream.open();
while (true) {
let chunk = await stream.readChunk();
if (!chunk) break;
await send(chunk);
}
Is there a way to achieve this functionality currently? If not, I suggest adding this implementation.
gabrielberlanda, josephmbeveridge, daner06, lynrose10, julian-becker and 1 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed