Brandur 81b7cb3ca8 Relax constraints on objects that we'll accept as a file
When uploading a file, we previously made a check on whether it
supported both `#read` and `#path` before wrapping it in a
`Faraday::UploadIO` and sending it off. The second check on `#path`
isn't strictly necessary, and as reported in #761 can prevent objects
created by `open-uri` from being compatible with file upload.

Here we remove the check `#path` so that we just require that objects
support `#read`, and in addition error when an object is passed that's
not file-compatible and not a string. This should prevent users from
seeing the very confusing "Invalid hash" error in these situations.

Fixes #761.
2019-04-16 08:33:42 -07:00
..
2018-07-27 19:14:37 -04:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-08-03 00:07:27 +02:00
2018-07-19 14:23:07 +02:00
2018-10-30 10:25:10 -07:00
2019-04-02 10:28:11 -07:00