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

fix media upload in create_tweet example #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dwrensha
Copy link

@dwrensha dwrensha commented Sep 13, 2022

Fixes #125.

If handle.progress is None, as it commonly is for image uploads, then get_status() will return a 404, so we need to check it before calling get_status().

I tested that this works both with an image upload, where progress is None, and a video upload, where progress is non None.

@OneSecure
Copy link

OneSecure commented Sep 14, 2022

I have tested it. It's work fine. Thanks.

@dwrensha
Copy link
Author

What would the reason be for that modification to Cargo.toml? Does cargo build --example create_tweet not work?

@OneSecure
Copy link

Sorry I'm newbee in rust.

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

Successfully merging this pull request may close these issues.

Can't post tweet with image
2 participants