curb icon indicating copy to clipboard operation
curb copied to clipboard

Can't specify Content-type for Curl::Postfield.file

Open jonathan-mui opened this issue 13 years ago • 2 comments

You can specify content-type for Curl::Postfield.content, but not for Curl::Postfield.file.

http://curb.rubyforge.org/classes/Curl/PostField.html

jonathan-mui avatar Jun 18 '12 21:06 jonathan-mui

You can specify it in a separate step:

field = Curl::PostField.file(...)
field.content_type = "image/jpeg"

senvee avatar Nov 13 '12 19:11 senvee

I'm not sure I'll have time to work on that in the near future, if you or someone wants to submit a pull request, I'll definitely merge it in for you.

taf2 avatar Nov 29 '12 01:11 taf2