Closed rommel-pinata closed 1 year ago
we are good now?
Yes once this is merged and published you should be able to upload. One thing to check is that now you have to create an instance of the class
const pinataSDK = require('@pinata/sdk');
const keys = require("./key");
const pinata = new pinataSDK(keys.apiKey,keys.apiSecret);
async function exec(){
const result = await pinata.pinFromFS("/Users/rommelberrios/Documents/pinata/Pinata-SDK/pinata.png", {pinataMetadata: {name: "different-name.jpg"}});
console.log('result', result)
}
exec()
I saw that it's now instantiated with the "new" statement when I checked the docs this morning, it was failing when I tried to instantiate it like a new class earlier but I'll try once it's live. Btw the original post wasn't mine so I don't know if that person knows, but I had the same issue.
It seems both faced the same error
Fixes #133