# File lib/http/form_data/file.rb, line 36 def initialize(path_or_io, opts = {}) opts = FormData.ensure_hash(opts) if opts.key? :mime_type warn "[DEPRECATED] :mime_type option deprecated, use :content_type" opts[:content_type] = opts[:mime_type] end @io = make_io(path_or_io) @content_type = opts.fetch(:content_type, DEFAULT_MIME).to_s @filename = opts.fetch(:filename, filename_for(@io)) end