vincenzoAiello / DArchive

3 stars 4 forks source link

Error when tying to fetch filebuffer in File object #5

Closed alexanderbkl closed 2 years ago

alexanderbkl commented 2 years ago

When fetching the blob from an uri of a file inside the Android emulator, I get this error:

e.stream is not a function. (In 'e.stream()', 'e.stream' is undefined)
at node_modules\web3.storage\dist\bundle.esm.min.js:10:87368 in resolve$3

My code inside Home copy.js:

const response = await fetch(file.uri);
const blob = await response.blob();
filebuffer = blob;

const file = new File([filebuffer], "file");
alexanderbkl commented 2 years ago

Passed to using unbundled web3.storage but gave place to other errors with dependencies.