Way to limit file upload size using file_column or attachment_fu

While I know this can be done with some flas based solutions, how can one limit the size of an upload to an RoR application within the application rather than via apache's configuration? I just don't want anyone trying to upload a 100mb file.

thanks

David

DavidB wrote:

While I know this can be done with some flas based solutions, how can one limit the size of an upload to an RoR application within the application rather than via apache's configuration? I just don't want anyone trying to upload a 100mb file.

Haven't used FileColumn though I know that you can configure the :size parameter of has_attachment in attachment_fu. You'll subsequently want to use the built-in validates_as_attachment too.

I've heard good stories about the Paperclip plugin - you might want to check out that one too.

Check out Attachment Fu plugin. It has options for setting the max limit on the size of the file that can be uploaded. I am no expert in it, but don't need to. I just followed the recipes in Advanced Rails Recipes by Mike Clark. Well worth the money since you can quickly find out the answers to these questions. Bharat