Class: ZendeskAPI::Middleware::Request::Upload

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/zendesk_api/middleware/request/upload.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object


10
11
12
13
14
15
16
17
# File 'lib/zendesk_api/middleware/request/upload.rb', line 10

def call(env)
  if env[:body]
    set_file(env[:body], :file, true)
    traverse_hash(env[:body])
  end

  @app.call(env)
end