def sanitize!
      if rails_file?
        @file = @original
        @content_type = @original.content_type
        @path = @original.tempfile
      elsif sinatra_file?
        @file = @original[:tempfile]
        @content_type = @original[:type]
        @path = @original[:tempfile].path
      elsif io?
        @file = @original
        @content_type = @original.content_type if @original.respond_to?(:content_type)
        @path = @original.path if @original.respond_to?(:path)
      elsif string?
        @file = File.open(@original)
        @content_type = nil
        @path = @original
      else
        raise ArgumentError, "invalid file format"
      end
    end
def sanitize!
      if rails_file?
        @file = @original
        @content_type = @original.content_type
        @path = @original.tempfile
      elsif sinatra_file?
        @file = @original[:tempfile]
        @content_type = @original[:type]
        @path = @original[:tempfile].path
      elsif io?
        @file = @original
        @content_type = @original.content_type if @original.respond_to?(:content_type)
        @path = @original.path if @original.respond_to?(:path)
      elsif string?
        @file = File.open(@original)
        @content_type = nil
        @path = @original
      else
        raise ArgumentError, "invalid file format"
      end
    end
Extracts the tempfile, content type and path.