what i need is passing local html file to my form, get content of this file and later parse it.
I have this in view
= form_tag :parser, :html => {:multipart => true} do
= file_field_tag :html_file
= submit_tag
And this in controller
def parser
@file = params[:html_file]
end
It seems like form dont get file, just get the string with name of file. How to fix it?
I wrote this to handle uploads in a Rails 2.3.x app. I cannot remember why I had to split this into an if/elsif/else/end statement, but I must have had an error consolidating it to one if statement.