validates_filesize_of :field, :in => 15.kilobytes..1.megabyte
On 12/26/05, Cory Wilkerson <coryw@americanmonkey.com>
wrote:> Hey All. Season's Greetings.
>
> Can anyone here elaborate on how one can restrict the size of image
> uploads using file_column/rmagick? I'd like to be able to, in my
> controller/model, check the size of an uploaded image, and if it's size
> on disk exceeds x amount, I'd like to indicate to the user that this is
> a no-go and kill the temp file.
>
> Any ideas?
>
> Thanks a ton.
> Cory Wilkerson
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Kyle Maxwell
Chief Technologist
E Factor Media // FN Interactive
kyle@efactormedia.com
1-866-263-3261
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails