Hey everyone, I am getting an error while uploading the file. Any help!
async function fileEvent(){
var fileInput = document.getElementById("input");
const rootCid = await client.put(fileInput.files[0]);
console.log(rootCid);
const res = await client.get(rootCid);
const files = await res.files();
const url = URL.createObjectURL(files[0]);
console.log(url)
setFile(url)
}
Thank you.