From: misiek Date: 2006-03-07T06:38:42+09:00 Subject: imginfo = Magick::Image.read(@params['image']['name']) .first 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 => @property.id }, :multipart => true )%> <%= file_field 'image', 'name' %>
<%= submit_tag "send" %> <%= end_form_tag %> and in controller I have imginfo = Magick::Image.read(@params['image']['name']) .first but the params @params['image']['name'] is wrong ???? unable to open image `#': No such file or directory: I save this file like that so I use paraqs the same ?? #File.open("#{RAILS_ROOT}/public/images/#{params[:id]}/oryg/#{new_image.name}", "w") { |f| f.write(@params['image']['name'].read) }