PatrickAlphaC / nft-mix

MIT License
825 stars 414 forks source link

There is no main() in upload_to_pinata.py #92

Open snowyaya opened 2 years ago

snowyaya commented 2 years ago

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())
PatrickAlphaC commented 2 years ago

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

Care to make a PR?

snowyaya commented 2 years ago

@PatrickAlphaC Sure! I will make one!

snowyaya commented 2 years ago

Pr was created.