nft-mix icon indicating copy to clipboard operation
nft-mix copied to clipboard

There is no main() in upload_to_pinata.py

Open snowyaya opened this issue 2 years ago • 3 comments

main() is not included in the file. Should be:

def main():
    with Path(filepath).open("rb") as fp:
        image_binary = fp.read()
        response = requests.post(
            PINATA_BASE_URL + endpoint,
            files={"file": (filename, image_binary)},
            headers=headers,
        )
        print(response.json())

snowyaya avatar Mar 27 '22 03:03 snowyaya

Doesn't necessarily need to be a main function.... but you're right it is much nicer.

Care to make a PR?

PatrickAlphaC avatar Mar 28 '22 20:03 PatrickAlphaC

@PatrickAlphaC Sure! I will make one!

snowyaya avatar Mar 28 '22 22:03 snowyaya

Pr was created.

snowyaya avatar Mar 29 '22 17:03 snowyaya