Class: Vox::HTTP::UploadIO
- Inherits:
-
Faraday::UploadIO
- Object
- Faraday::UploadIO
- Vox::HTTP::UploadIO
- Defined in:
- lib/vox/http/upload_io.rb
Overview
Wrapper to faraday’s UploadIO that allows for an optional MIME type
Instance Method Summary collapse
-
#initialize(file, mime_type = nil, name = nil) ⇒ UploadIO
constructor
A new instance of UploadIO.
Constructor Details
#initialize(file, mime_type = nil, name = nil) ⇒ UploadIO
Returns a new instance of UploadIO.
17 18 19 20 |
# File 'lib/vox/http/upload_io.rb', line 17 def initialize(file, mime_type = nil, name = nil) mime_type ||= mime_for_file(file.respond_to?(:path) ? file.path : file) super(file, mime_type, name) end |