Get Blob of Image? Breaking change SDK 31

Hello.

Something changed with SDK 31 that now when you call on a //file:

const response = await fetch(uri);

It returns Network failed request.

According to expo.

https://github.com/expo/firebase-storage-upload-example/blob/master/App.js

That is the right approach to upload to firebase storage.

Uploading a base64 wont work as firebase has an issue as well:

https://github.com/firebase/firebase-js-sdk/issues/576

So now the only approch left is to somehow get the BLOB from the FileSystem (Expo)

How can I accomplish that?

3 Likes

Has anyone found a good work around regarding this? I tried using base64 instead and it worked for some images, but seems to be inconsistent. Only tested on iOS.

EDIT:
https://github.com/expo/firebase-storage-upload-example/issues/13
https://github.com/facebook/react-native/pull/22063

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.