title: How to create an instance of an uploaded file programmatically in rails
body: <p>I want to create an instance of "uploaded_file = ActionController::UploadedTempfile"  from a File.new("path/to/file"), and then go on to do processing on "uploaded_file" like so:</p>
  
  <pre><code>uploaded_file = ActionController::UploadedTempfile.new(File.new "path/to/file").
  </code></pre>
  
  <p>But for everything to work correctly, I need to set it so that uploaded_file.original_filename method and uploaded_file.content_type methods work correctly. How do i assign its variables so that it works?</p>