Configuring File Upload for Sakai 2.2 - Glenn Golden
I don't think anyone is doing this now, but in case I missed someone, there's been a change in how you configure the Sakai request filter to have a different upload.max setting than the rest of Sakai.
Usually, the file upload total size in megabytes is set for all of Sakai in sakai.properties with:
# upload limit per request, in megs
content.upload.max=50
You can override it in any request filter by setting the filter's init parameters:
<filter> <filter-name>sakai.request</filter-name> <filter-class>org.sakaiproject.util.RequestFilter</filter- class> <init-param> <param-name>upload.max</param-name> <param-value>50</param-value> </init-param> </filter>
The change is how the request filter's parameter value is interpreted. It used to be a bytes value. Since all the other ways to set the upload.max are in megabytes (i.e. that in sakai.properties, and the new per-request method), I've changed the request filter's value to be in megabytes, too. So the above example would be interpreted as 50 megs, not 50 bytes.
If you have a request filter with an "upload.max" parameter, you have to adjust your settings, or else you will end up with a rather large max value.
Oh, and that new feature... if you encode a URL parameters of "upload.max=50" on the form POST action URL for a file upload request, that value will be used for just that request. It gives you a way to override the system-wide setting, and the request filter setting, for a specific request. (See JIRA SAK-5154).
These changes are in the trunk now, and will be in 2.2 as of 005.
Previous Versions of Sakai
Currently, file upload quota limits are defined by the site quota, which is specified as a property of the site object, namely ResourcePropertiesof.PROP_COLLECTION_BODY_QUOTA.
You can set the site quota when you log in as an admin and use the admin's Site Management tool to edit site info. The Site Management tool is not enabled as part of the default toolset. You must add it to the admin's workspace using the Sites tool.
| File Upload limits and session timeouts Some developers have chosen to reset the content.upload.max in sakai.properties to change the maximum upload size limit. However, when uploading very large files the session are sometimes lost during the upload. A workaround is to increase the default session.lost 30 second time-limit property in your sakai.properties file. Increasing the timeout may cause your application server(s) to be slighty less responsive when detecting the loss of a browser since the default 30 second timeout is keyed to the 10 second pulse of the courier service. |
Comments (2)
Mar 23, 2005
Anonymous says:
You can also change a site's quota by logging in as admin, going to the site's R...You can also change a site's quota by logging in as admin, going to the site's Resources tool, and clicking the 'i' icon next to the Location: Resources text (the breadcrumb) just above the list of Resources. This shows you the Resources 'root' level folder's metadata. Clicking revise there gives you a field to type in the quota. The field is editable only when logged in as admin or a user with admin rights.
Feb 06, 2007
David Haines says:
The 'i' icon is not visible in the 2.3.0 release, but the site quota value can b...The 'i' icon is not visible in the 2.3.0 release, but the site quota value can be changed by revising the top level resources folder in a site. You need admin privileges.