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

Faraday's multipart support and ruby-filemagic #211

Closed
amw opened this issue Nov 6, 2012 · 1 comment
Closed

Faraday's multipart support and ruby-filemagic #211

amw opened this issue Nov 6, 2012 · 1 comment

Comments

@amw
Copy link

amw commented Nov 6, 2012

Hi, I've ran into a problem when using faraday (through zendesk client gem) and ruby-filemagic gems at the same time.

Ruby-filemagic defines content_type on String and faraday checks for that method to detect files. More info in an issue at zendesk client:
zendesk/zendesk_api_client_rb#61

I would create an issue at ruby-filemagic since content_type is a little unexpected on a String, but I think it's actually faraday that doesn't adhere to the "quacks like a duck" rule. It's ok to check for respond_to? instead of kind_of?, but you should check all the methods you intend to use. Faraday uses but doesn't verify existence of original_filename method.

@amw
Copy link
Author

amw commented Nov 6, 2012

It seems it's actually an issue in multipart-post:
socketry/multipart-post#20

@amw amw closed this as completed Nov 6, 2012
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

1 participant