Method: TheCity::API::Request::MultipartWithFile#call
- Defined in:
- lib/the_city/api/request/multipart_with_file.rb
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/the_city/api/request/multipart_with_file.rb', line 9 def call(env) for key, value in env[:body] if value.respond_to?(:to_io) env[:body][key] = Faraday::UploadIO.new(value, mime_type(value.path), value.path) end end if env[:body].is_a?(::Hash) @app.call(env) end |