this is my view-
<%= start_form_tag( {:action => 'create'}, {:multipart => "true"},
{:id=>"files"},{:enctype=>"multipart/form-data"} ) %>
<input type="file" name="logo_file" />
<%= end_form_tag %>
and in my controller i have opened the file in write mode with same
file name from view and path i have specifed and whole file i have
written to this new file.
@file = params[:logo_file]
if @file.original_filename.length > 0
filename = "E:/" + @file.original_filename
File.open(filename, "wb") { |f| f.write(@file.read) }
end
good luck.