Hello,
I am using code similar to the following.
In ERC1155, token substitution is used.
Moralis File doesn’t seem suited to handle these types of uploads.
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
How would anyone handle this scenario? ERC1155 has fixed url and incremented tokenId.
How do i match my token metadata to the upload path? I assume i upload first, then mint the token.
const file = {
base64: btoa(JSON.stringify(json_obj)),
};
saveFile("something.json", file, {
saveIPFS: true,
onComplete: () => {
console.log("Complete");
},
onSuccess: (res: any) => {
console.log("Success");
console.log(res);
},
onError: (err: any) => {
console.log("Error");
console.log(err);
},
});
Regards,
Daniel