# Imginfo = Magick::Image.read(@params\['name'\]) .first

**URL:** <https://www.ruby-forum.com/t/imginfo-magick-image-read-params-name-first/54487>\
**Category:** Ruby\
**Created:** [March 6, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/imginfo-magick-image-read-params-name-first/54487 "2006-03-06T22:41:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@misiek](https://www.ruby-forum.com/u/misiek)\
**Post date:** [March 6, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/imginfo-magick-image-read-params-name-first/54487/1 "2006-03-06T22:41:40Z")

</div>

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 `#\<File:0xb75bfa00\>’: 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) }
