Skip to content

fix media upload in create_tweet example#130

Open
dwrensha wants to merge 1 commit intoegg-mode-rs:masterfrom
dwrensha:fix-create-tweet-example
Open

fix media upload in create_tweet example#130
dwrensha wants to merge 1 commit intoegg-mode-rs:masterfrom
dwrensha:fix-create-tweet-example

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