Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
snowyaya opened this issue Mar 27, 2022 · 3 comments
Open

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

snowyaya opened this issue Mar 27, 2022 · 3 comments

Comments

@snowyaya
Copy link
Contributor

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
Copy link
Owner

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

Care to make a PR?

@snowyaya
Copy link
Contributor Author

@PatrickAlphaC Sure! I will make one!

@snowyaya
Copy link
Contributor Author

Pr was created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants