You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.
Hi there,
I was trying this example using Expo SDK 31 and Android 5 and 7 (because SDK 31 only works with 5+)
But there is an issue here:
const response = await fetch(uri);
It will say:
[TypeError: Network request failed]
It was working when I was using SDK 27 and Android 4
Now that I upgraded Expo I came across this issue..
The text was updated successfully, but these errors were encountered:
@edvin1983 I already have a fix. You can use this function to get the blob:
function urlToBlob(url) {
return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest();
xhr.onerror = reject;
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
resolve(xhr.response);
}
};
xhr.open('GET', url);
xhr.responseType = 'blob'; // convert type
xhr.send();
})
}
I was using Expo sdk 32 and there is literally nothing about getting an image to firebase storage in expo. It seemed impossible. However, your xhr example and the fantastic explanation around it in the github comment has solved everything. Well done.
Hi there,
I was trying this example using Expo SDK 31 and Android 5 and 7 (because SDK 31 only works with 5+)
But there is an issue here:
const response = await fetch(uri);
It will say:
[TypeError: Network request failed]
It was working when I was using SDK 27 and Android 4
Now that I upgraded Expo I came across this issue..
The text was updated successfully, but these errors were encountered: