I tried to create an item and its showing this error below
Uncaught (in promise) TypeError: Moralis.file is not a constructor
at HTMLButtonElement.createItem (main.js:130)
I tried to create an item and its showing this error below
Uncaught (in promise) TypeError: Moralis.file is not a constructor
at HTMLButtonElement.createItem (main.js:130)
you can try: new Moralis.File
instead of Moralis.file how that error says
Okay let me try it out now
After adding the code, it shows this error in console
Uncaught (in promise) TypeError: item.set is not a function
at HTMLButtonElement.createItem (main.js:152)
Itβs resolved iβve added some line to it and it works out thanks bro
@cryptokid please help me on this
I am trying to get the alert and the user to see they successfully uploaded their NFT using this below, but i got errors and its not working out the way i want it.
btnCreateItem.onclick = async function btnCreateItem() {
if (btnCreateItem) {
document.getElementById("btnCreateItem").onclick = createItem;
alert("Your NFT is Created Successfully!");
console.log("Item is uploaded");
await item.save();
} else {
alert("Your NFT is not created");
console.log("Item Uploading Failed!");
}
};
you should create different posts for different questions