-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 update_with_media #525
Conversation
* send multipart/form-data header * send requests to upload.twitter.com
I should also mention mention that i've successfully tested this to verify it works. |
I believe this is already working in |
My mistake, I thought the |
The I’ve asked @tarcieri to provide a nicer interface (or at least an example) of how to perform a multipart post using the Also, the You’ll need to update the gem 'http', :git => 'https://github.com/sferik/http.git', :branch => 'parse' You may also wish to use my gem 'webmock', :git => 'https://github.com/sferik/webmock.git', :branch => 'http' |
Thanks! I was just figuring out what versions you were using as pointing at |
I am trying to use file = File.read("./public/uploads/#{image_name}").encode!('UTF-8', 'UTF-8', :invalid => :replace)
@client.update_with_media(post.content, file) |
@justspamjustin file = File.new("./public/uploads/#{image_name}")
@client.update_with_media(post.content, file) |
@sferik Thanks. I'm still a bit new to ruby. |
@justspamjustin No problem. In the future, please use the mailing list or Stack Overflow for support questions. You may also be interested in reviewing the documentation for |
5b495e9
to
5c57042
Compare
42b2586
to
c326a83
Compare
This turned out to be easier than I thought it'd be.
update_with_media
is fairly well tested so I'm not sure additional tests are necessary as these changes are below the surface. I'm happy to add some if you think it's needed.