Forum: Ruby on Rails file_column + restrictions

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.
Ee7be48e775d357de69db2754a377160?d=identicon&s=25 Cory Wilkerson (corywilkerson)
on 2005-12-26 19:29
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
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2005-12-26 21:20
(Received via mailing list)
validates_filesize_of :field, :in => 15.kilobytes..1.megabyte

On 12/26/05, Cory Wilkerson <> wrote:
> Thanks a ton.
> Cory Wilkerson
> --
> Posted via
> _______________________________________________
> Rails mailing list

Kyle Maxwell
Chief Technologist
E Factor Media // FN Interactive
This topic is locked and can not be replied to.