|Edit configuration property settings to limit the types of files that can be uploaded into Activities, the maximum size of an uploaded file, and the number of server threads concurrently dedicated to downloading files from Activities to clients.
Before you begin
To edit configuration files, you must use the wsadmin client. See Starting the wsadmin client
About this task
The Activities content store is used to store files that users upload to their activities.
To set limits on uploaded files, complete the following steps
- Use the wsadmin client to access and check out the Activities configuration files.
- Use the following command to access the Activities configuration file:
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored.
- Check out the Activities configuration files using the following command:
- working_directory is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft® Windows® operating system.
Note: AIX® and Linux® only: The directory must grant write permissions or the command will not run successfully.
- cell_name is the name of the WebSphere® Application Server cell hosting the IBM Connections application. This argument is case-sensitive, so type it with care. If you do not know the cell name, you can determine it by typing the following command in the wsadmin command processor:
- Microsoft Windows:
- From the temporary directory to which you just checked out the oa-config.xml file, open the file in a text editor.
- Edit the elements in the <objectStore> section of the file to set limits on the files that can be uploaded.
To remove a file upload limitation, delete the <limit> element representing the file type that you want to permit users to upload.
To enable unlimited simultaneous downloads, remove the <max-concurrent-downloads> element.
Save and close the oa-config.xml file.
After making changes, you must check the configuration files back in and you must do so during the same wsadmin session in which you checked them out for the changes to take effect. You must also restart the server. See Applying property changes for details.
After restarting the Activities server, review the WebSphere Application Server SystemOut.log file to ensure that the Activities application was able to initialize with the modified configuration.
- To prevent users from being able to upload files of a specific type to Activities, add a <sizeLimits> element block to the <objectStore> section. For each file type that you want to disable, create a <limit> element. Set the mimeFilenameRegex attribute of the <limit> element equal to the file extension of the file type that you want to prevent users from uploading. Set the value of the limit element to 0. For example, the following element prevents users from being able to upload executable files:
When you specify a value for the mimeFilenameRegex attribute, you are specifying a regular expression. Regular expressions are normally case sensitive, and in the 1.0.x releases were treated as such. With release 2.0, the filter has been enhanced to be case insensitive. For example, if you specify <limit mimeFilenameRegex=".*\.exe">
, the tool will filter any files with a .exe extension regardless of the case in which the letters EXE are specified.
- To limit the size of all files uploaded to the Activities content store, modify the value of the <limit> element for the entry with the .* extension. Specify the new maximum size value in bytes. For example, the following property settings specifies that all files must be smaller than 10 MB:
- To limit the number of threads that are allowed to concurrently respond to requests to download files from the Activities content store, edit the value of the <max-concurrent-downloads> element. For example, the following property settings allows the server to permit a maximum of 10 downloads at one time:
The following lines of XML provides an example of oa-config.xml
file content that describes a <sizelimit> configuration. In this example, files with .exe, .sh, .bat, and .oa extentions cannot be uploaded to Activities, the maximum file size of an uploaded file is approximately 10MB, and the number of concurrent downloads is limited to 5.
Parent topic: Managing uploaded files
Checking out the Activities configuration files
Applying property changes in Activities