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
..
2019-04-02 10:25:05 -07:00
2019-01-16 18:50:14 -08:00
2019-04-02 10:06:40 -07:00
2018-11-27 14:10:18 +01:00
2018-08-30 20:11:07 -04:00
2018-07-27 19:14:37 -04:00
2019-03-18 16:28:24 -07:00
2018-12-07 16:06:04 -08:00
2019-04-02 10:06:40 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-07-19 14:23:07 +02:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-08-16 11:00:22 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2018-07-19 14:23:07 +02:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2018-07-19 14:23:07 +02:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-07-19 14:23:07 +02:00
2018-08-03 00:07:27 +02:00
2019-04-16 08:33:42 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2018-07-19 14:23:07 +02:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-12-31 13:47:35 -07:00
2018-07-19 14:23:07 +02:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2018-10-30 10:25:10 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2018-07-19 14:23:07 +02:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2019-03-25 18:34:12 -07:00
2019-03-18 11:52:35 -07:00
2018-05-10 14:56:14 -07:00
2018-08-21 08:56:18 -04:00
2019-02-11 22:38:08 -08:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2018-05-10 14:56:14 -07:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:06:40 -07:00
2018-08-21 08:56:18 -04:00
2018-05-10 14:56:14 -07:00
2019-04-02 10:06:40 -07:00
2019-04-02 10:28:11 -07:00
2018-10-30 10:36:10 -07:00
2018-05-10 14:56:14 -07:00