- SDK Version: 39
- Platforms(iOS):
I have problems uploading an image to firebase storage with IOS in sdk 39, in android it works perfect, in iOS in sdk 38 and later it worked perfect but now in sdk 39 the file is uploaded to firebase storage but with the application/octet-stream format and 0 bytes.
I use urlToBlob
export const urlToBlob = (url) => {
return new Promise((resolve, reject) => {
const 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();
})
}
Help please!