title: undefined method `original_filename' for Upload
body: <p>Can't seem to identify why I would be getting a undefined method original_filename, trying to do a file upload that checks the file extensions. Any ideas where im going wrong here</p>
  
  <pre><code>class SpreadsheetTagService 
    include Roo
  
    def initialize(uploaded_file)
      open_spreadsheet(File.new(uploaded_file.tempfile.path))
      read_file(open_spreadsheet)
    end 
  
    private 
      def read_file(file)
        @spreadsheet = open_spreadsheet(file)
  
        @spreadsheet.each_with_pagename do |name,sheet|    
          Rails.logger.debug( sheet )
        end    
      end
  
      def open_spreadsheet(file)
        case File.extname(file.path)
          when ".csv" then Csv.new(file.path, nil, :ignore)
          when ".xls" then Excel.new(file.path, nil, :ignore)
          when ".xlsx" then Excelx.new(file.path, nil, :ignore)
          else raise "Unknown file type: #{file.original_filename}"
        end
      end
  end
  </code></pre>
  
  <p>Controller </p>
  
  <pre><code>class SpreadsheetServiceController &lt; ApplicationController
  
    def new
    end
  
    def create    
      parser = SpreadsheetTagService.new(params[:spreadsheet][:file])
  
      respond_to do |format|
        format.all {render :json =&gt; 'Done'}
      end
    end
  end 
  </code></pre>