Pinata plugin - 400 error pinning file

Does anyone know how to properly use the Moralis Pinata plugin?

I check this: https://moralis.io/plugins/pinata/

Within my async function I do this to upload to Moralis IPFS which works fine:

const file = new Moralis.File(logo.name, logo);
await file.saveIPFS();
profile.set('logo', file.ipfs());

When I install the Pinata plugin and add the API keys I changed the above code to this:

const pinataLogo = await Moralis.Plugins.pinata.pinFile(logo); // this is the File but also tried logo.name here
profile.set('logo', pinataLogo);

This gives the following error:
400 - POST: https://******.usemoralis.com:2053/server/functions/pinata_pinFile

That plugin is not production ready, you could use the normal IPFS upload functionality

1 Like

Alright thanks, Moralis email support told me to use it.

I wanted to keep files separate from Moralis and support suggested I use it.

You could use pinata directly if you want too