Skip to content

Instantly share code, notes, and snippets.

View heidyhb89's full-sized avatar

Heidy Hernandez Breton heidyhb89

View GitHub Profile
const buffer = await getWnft(args, { size: IMAGE_SIZE }); // returns Buffer
// we are calling the function below with `fileData: buffer`
static async uploadFileToIPFS({ fileData, metadata = {} }) {
const pinataOptions = {
cidVersion: PINATA_CID_VERSION,
wrapWithDirectory: false,
};
const pinataMetadata = {