Is there a way to limit the size of uploaded files?

We are a self-hosted environment running Tomcat on Windows and are looking for a way to limit the size of a file students can upload either as an assignment or to a discussion board.

The change was made in the bb-config.properties file

#################### filesize upload size limit #####################

## maximum size (in bytes) of an uploaded file ##

## can be expressed as a number followed by a "K", "M", or "G", ##

## interpreted as kilobytes, megabytes, or gigabytes, respectively ##

bbconfig.fileupload.max.filesize=100m

However, after making the change, we were still able to upload files > 100m.

After contacting support, we were informed that this is a known issue and there is currently not a fix available. Their solution was to front-end tomcat with either Apache or IIS, and neither are a viable option for us.

Is anyone aware of a method or possibly even a building block that we could use to enforce this file size limit?

Hey Eddie! Many area's of the system use the upload size limit configured via parameter bbconfig.fileupload.max.filesize in bb-config.properties, any that use a certain FileUpload package. There are some area's which don't, examples include any uploads done via WebDAV, BbDrive, or multiple-file upload applet. A known issue was created to address the upload limit not applying to assignment submissions. I've listed the article below, but I see it should be fixed in the October release, which you're on.

Providing an update for future readers. I confirmed that the file upload limit works for Assignments on October. However, the bbconfig value is case specific which is what I just found out with further testing.

This setting should constrain all area's that use the FileUpload package from Apache. You'll need to test it for the various tools you want to limit. It does appear to limit Course Restores as I receive the "Connection Reset" message upon uploading a file larger than the set value. You should be able to upload them via the backend scripts instead though.

Great tool to mention, it's important to keep in mind if you enact this setting since some Course Archives can be very large.

Can this be setting be different across nodes? We have a non-pooled node we use for the activemq broker and backend processes, and were thinking we could keep the setting higher on this node, and low on the public-facing nodes. Would that be a supported configuration? Thanks!