fix: json

This commit is contained in:
aryan
2024-12-05 20:28:02 +05:30
parent c31146031a
commit 205ff4891c
5 changed files with 155 additions and 36 deletions

View File

@@ -39,12 +39,15 @@ async function uploadMetadata(
finalFormData.append('file', files.file);
}
console.log("Final form data:", finalFormData);
const metadataResponse = await fetch("https://pump.fun/api/ipfs", {
method: "POST",
body: finalFormData
});
if (!metadataResponse.ok) {
console.log("Metadata response:", await metadataResponse.json());
throw new Error(`Metadata upload failed: ${metadataResponse.statusText}`);
}