Displaying 2 results from an estimated 2 matches for "validates_attachment_size".
2010 Nov 18
0
max_allowed_packet mysql
Hi
I am using rails 2.3.8 with mysql 5.1. In my attachment model the
validation was
validates_attachment_size :attachment, :less_than => 2.megabytes,
:message => "Upload file size should not exceeds 2 MB"
And my /etc/my.ini has
max_allowed_packet = 16M
The above worked perfectly. But now I need file limit size as
10 MB instead of 2 MB. So I changed validation like
validates_...
2012 Aug 18
2
Paperclip images are not stored in my directory
...t;500x500>", :thumb => "60x60>" },
:url => "/assets/users/:id/:style/:basename.:extension",
:path =>
":rails_root/public/assets/users/:id/:style/:basename.:extension"
validates_attachment_presence :photo
validates_attachment_size :photo, :less_than => 5.megabytes
validates_attachment_content_type :photo, :content_type => [''image/jpeg'',
''image/png'']
Please advice me...
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g...