Hey guys, iâm using
new Moralis.File(ânftfile.pngâ, createItemFile.files[0]);
to upload png files to ipfs.
I want it to be able to accept(png,jpg, and gifs) how do i adjust the above code to do that?
Hey guys, iâm using
new Moralis.File(ânftfile.pngâ, createItemFile.files[0]);
to upload png files to ipfs.
I want it to be able to accept(png,jpg, and gifs) how do i adjust the above code to do that?
you can upload any kind of binary data with that function, if you want to accept only a specific format, youâll have to check the contents of the data before uploading it to IPFS. The extension from that filename on its own can be anything that doesnât represent the contents of the file
Ah i see now. Thanks bud