Open jakobsuckow opened 1 year ago
Here are my dependencies:
"dependencies": {
"@config-plugins/react-native-blob-util": "^2.0.0",
"@config-plugins/react-native-pdf": "^2.0.0",
"expo": "^44.0.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-blob-util": "^0.16.0",
"react-native-pdf": "^6.5.0",
...
},
Same problem I'm getting stream type of data from api but can't convert into url
What
react-native
version are you using? 0.64.3, I am also using expo Whatreact-native-pdf
version are you using? 6.5.0 What platform does your issue occur on? (android/ios/both) android only Describe your issue as precisely as possible : I am downloading the PDF via a hook that returns a blob. The blob is constructed correctly (as the PDF Renders on iOS). This is how the blob looks on android {"_data":{"size":11609800,"offset":0,"blobId":"992147c5-e604-47dd-a289-01dd7b4db733","__collector":{}}}This is how the blob looks on iOS {"_data":{"size":11609800,"offset":0,"blobId":"C6E13931-4AC3-449B-AC07-D6CFC305B355","type":"image/pdf","name":"test.pdf","__collector":{}}}
On Android I am getting an error at the function URL.createObjectURL(data). It throws:
"Cannot create URL for blob!"
1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interesting
logs
Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
The data is fetched as follows: