Open shamilovtim opened 6 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
Hi @shamilovtim, I'm looking into this. Blob on RN is String based and does not provide any stream/binary API. Could you describe your usage/need? So we can find out what else we should do to make Blob more usable.
Hi @huzhanbo1996
The problem is that everyone on web builds on the Blob specification which is available on other platforms and browsers but RN's Blob does not meet these specifications. Then when libraries are used in RN they break because they rely on broken / incomplete Blob.
To describe what I need
Blob on RN is String based and does not provide any stream/binary API
- Yes this is also a separate problem. I need to be able to call
stream()
on Blob as well, and this is another case where RN Blob does not match web specs.
Somewhat related to this, and specifically related to this part:
Blob on RN is String based and does not provide any stream/binary API.
I guess that this is the reason that Response#arrayBuffer()
doesn't work, which in turn makes ky
not work (https://github.com/sindresorhus/ky/issues/566).
Just to forestall any duplicate efforts to fix I think @grabbou is working on a real Blob implementation
Description
The constructor for React Native's Blob has a comment:
BlobManager confirms this:
This API is not spec compliant, since this is what the Blob specification specifies:
Steps to reproduce
See that RN doesn't support Blobs composed of anything but Blobs or strings.
React Native Version
0.73.6
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
N/A
Screenshots and Videos
No response