Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

react native filereader.ReadAsDataUrl results in error

$
0
0

here is my version settings sense i saw it could affect things

this is function call im using and i am just passing in a normal blob that holds a size and type variable.

private _toBase64 = (file: Blob) =>
  new Promise<string | ArrayBuffer | null>((resolve, reject) => {
  const reader = new FileReader();
  reader.readAsDataURL(file);
  reader.onload = () => {
    resolve(reader.result);
  };
  reader.onerror = error => {
    console.log(error);
    reject(error);
  };
});

this is the error i recieve whenever this method is called

enter image description here

now the weird thing is a friend of mine has the same exact code on his computer and it works just fine


Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>