Forum: Ruby imginfo =['name']) .first

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
misiek (Guest)
on 2006-03-06 23:41
(Received via mailing list)
I  try do upload of image but before I need to check the size of it
so I made the form to uplaod

<%= form_tag({:action=>'upload', :id => }, :multipart =>
true )%>
   <%= file_field 'image', 'name' %><br>
   <%= submit_tag "send" %>
<%= end_form_tag %>

and in controller I have
imginfo =['image']['name']) .first

but the params @params['image']['name'] is wrong ????

unable to open image `#<File:0xb75bfa00>': No such file or directory:

I save this file like that so I use paraqs the same ??"#{RAILS_ROOT}/public/images/#{params[:id]}/oryg/#{}",
"w") { |f| f.write(@params['image']['name'].read) }
This topic is locked and can not be replied to.