Hey everyone! New here, Discord support is amazing but this is a bit more complicated so posting here.
I am trying to pass the URL from my IPFS upload to my IPFS metadata but it isnโt working. Can someone tell me what I am doing wrong here?
// upload metadata
const uploadMetadata = async (fileIpfsUrl) => {
const name = document.getElementById("metadataName").value;
const description = document.getElementById("metadataDescription").value;
const metadata = {
name: name,
description: description,
image: fileIpfsUrl,
};
const file = new Moralis.File("file.json", {
base64: btoa(JSON.stringify(metadata)),
});
await file.saveIPFS();
console.log(file.ipfs());
};
const handleFinal = async () => {
const image = await saveFileIPFS(file);
uploadMetadata();
};
Resulted IPFS stores.