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

file reader return blobId [closed]

$
0
0

enter image description here

here is my code i am passing in an interface that hold a blob under a data:Bl

  private _toBase64 = (file: any) =>
new Promise<string | ArrayBuffer | null>((resolve, reject) => {

  const reader = new FileReader;
  debugger;
  reader.readAsDataURL(file);
  reader.onload = () => {
    resolve(reader.result);
  };
  reader.onerror = error => {
    console.log(error);
    reject(error);
  };
});

Viewing all articles
Browse latest Browse all 6211

Trending Articles



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