Class: CloudConvert::File
- Inherits:
-
Faraday::Multipart::FilePart
- Object
- Faraday::Multipart::FilePart
- CloudConvert::File
- Defined in:
- lib/cloudconvert/file.rb
Instance Method Summary collapse
-
#initialize(file, content_type = nil, *parts) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(file, content_type = nil, *parts) ⇒ File
Returns a new instance of File.
3 4 5 6 7 |
# File 'lib/cloudconvert/file.rb', line 3 def initialize(file, content_type = nil, *parts) content_type ||= "text/plain" if file.is_a? StringIO content_type ||= Marcel::Magic.by_magic(file) || Marcel::Magic.by_path(file) super(file, content_type, *parts) end |