Skip to content

Instantly share code, notes, and snippets.

View stevedylandev's full-sized avatar
🛰️
Building orbiter.host

Steve Simkins stevedylandev

🛰️
Building orbiter.host
View GitHub Profile
@stevedylandev
stevedylandev / example.js
Last active November 17, 2022 03:53 — forked from heidyhb89/example.js
const { Readable } = require("stream");
const buffer = await getWnft(args, { size: IMAGE_SIZE }); // returns Buffer
const fileData = Readable.from(buffer)
// we are calling the function below with `fileData: buffer`
static async uploadFileToIPFS({ fileData, metadata = {} }) {
const pinataOptions = {
cidVersion: PINATA_CID_VERSION,
wrapWithDirectory: false,