title: How to get the filename of uploaded file in rails controller
body: <pre><code>&lt;%= file_field 'upload' %&gt;
  </code></pre>
  
  <p>In my controller, if I give the following, based on suggestions</p>
  
  <pre><code>filename=params[:upload]
  @result=filename.original_filename
  </code></pre>
  
  <p>I am getting.</p>
  
  <pre><code>undefined method `original_filename' for 
  #&lt;ActionController::Parameters:0x002b6c396e44b8&gt; 
  </code></pre>
  
  <p>Note: I am not using form. 
  Rails version is 4.0.2</p>