Open n1c01a5 opened 1 year ago
Had same issue, managed to fix it by sending Uint8Array of my file's buffer
const arrayBuffer = await fetch(url).then(response => response.arrayBuffer());
const cid = await Hash.of(new Uint8Array(arrayBuffer));
If I put a file as param I got this error:
Error: Content was invalid
.The code:
await Hash.of(file)
How can we compute the hash of a file ?