I am using roo-rb for accessing the uploaded files. My code is like this:
s = Roo::Excelx.new(params[:upload][:file].tempfile.path)
But I am having problem with it because the generated tempfile has no extension and I'm having this exception:
.../AppData/Local/Temp/RackMultipart20150216-10192-13yn50s is not an Excel-xlsx file
Is there a way to rename the tempfile.path
so that it will have a proper extension (xlsx)? Or is there a more elegant way to solve this problem?