Apologies in advance for the inquiry, but am not sure where else (or how else) to pose my inquiry. I make use of a OAuth2::Client with Faraday.default_adapter and am trying to figure out how to do a PUT with a chunked transfer encoding to stream a file to an endpoint. I can use File.read to put a file in memory and then PUT it in the body of a request, but this defeats the purpose. Is it possible to use Faraday in conjunction with OAuth2::Client to do such a thing? Is there perhaps some Faraday middleware module comparable to Faraday::Multipart::FilePart that would/could construct a chunked body for a large file to PUT? Thanks for any pointers.
Apologies in advance for the inquiry, but am not sure where else (or how else) to pose my inquiry. I make use of a
OAuth2::Client
withFaraday.default_adapter
and am trying to figure out how to do a PUT with a chunked transfer encoding to stream a file to an endpoint. I can useFile.read
to put a file in memory and then PUT it in the body of a request, but this defeats the purpose. Is it possible to use Faraday in conjunction withOAuth2::Client
to do such a thing? Is there perhaps some Faraday middleware module comparable toFaraday::Multipart::FilePart
that would/could construct a chunked body for a large file to PUT? Thanks for any pointers.