Uploading Base64 images as file objects to moralis servers?

Could someone assist me with this issue the videos and the writeups on this topic are poorly explained.

You can also use the below code to upload images where base64 variable will be encoded form of your image.

const base64 = "V29ya2luZyBhdCBQYXJzZSBpcyBncmVhdCE=";
const file = new Moralis.File("myfile.txt", { base64: base64 });

Read more at: https://docs.moralis.io/moralis-dapp/files/files#creating-a-moralis.file