Sha256: 26b231b62258917b6faa9d358d7ab93c3d8687758874c10427b1305bf80d88f3

Contents?: true

Size: 293 Bytes

Versions: 1

Compression:

Stored size: 293 Bytes

Contents

require 'mime/types'

module Dropmark
  class File < Faraday::UploadIO
    def initialize(file, mime = nil, filename = nil)
      if mime.nil? and detected_mimes = MIME::Types.type_for(file)
        mime = detected_mimes.first
      end
      super(file, mime.to_s, filename)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dropmark-0.1.5 lib/dropmark/file.rb