Open cice opened 4 years ago
At the moment, the File client follows the same implementation as all other endpoints. If you want to upload a file though, the API expects a multipart request containing the file contents + parameters.
This PR tries to solve this by introducing a new convern Upload. Unfortunately this is a very recent feature of Faraday (>= v1.0), so I had to introduce that version constraint. Furthermore, the Faraday guys haven't released a new, compatible version of faraday_middleware yet (see https://github.com/lostisland/faraday_middleware/issues/200), so this gem is temporarily bound to the corresponding Github commit (https://github.com/lostisland/faraday_middleware/commit/e169ab28a3f1fc6cc3160f86873903c7e5e8b882).
Upload
faraday_middleware
Because of this I open this PR as draft and to be discussed. Cheers
At the moment, the File client follows the same implementation as all other endpoints. If you want to upload a file though, the API expects a multipart request containing the file contents + parameters.
This PR tries to solve this by introducing a new convern
Upload
. Unfortunately this is a very recent feature of Faraday (>= v1.0), so I had to introduce that version constraint. Furthermore, the Faraday guys haven't released a new, compatible version offaraday_middleware
yet (see https://github.com/lostisland/faraday_middleware/issues/200), so this gem is temporarily bound to the corresponding Github commit (https://github.com/lostisland/faraday_middleware/commit/e169ab28a3f1fc6cc3160f86873903c7e5e8b882).Because of this I open this PR as draft and to be discussed. Cheers