Home

 

Set limits on uploaded files


Overview

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.

To edit configuration files, use wsadmin. See Start the wsadmin client for details.

The Activities content store is used to store files that users upload to their activities.


Set limits on uploaded files

  1. Use wsadmin to access and check out the Activities configuration files.

    1. Access the Activities configuration file:

      If prompted to specify which server to connect to, type 1.

      The information about which server to connect to is only used by wsadmin when you are running administrative commands to collect statistics.

    2. Check out the Activities configuration files...

        ActivitiesConfigService.checkOutConfig("<working_directory>", "cell_name")

      where:

      • <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.

      • cell_name is the name of the WebSphere Application Server cell hosting the Lotus Connections feature. This argument is required even in stand-alone deployments. This argument is also case-sensitive, so type it with care. If you do not know the cell name, do one of the following to determine it:

        • Stand-alone deployment: From the file system...

            WAS_HOME\profiles\profile_name\config\cells\

        • Network deployment: From wsadmin...

            print AdminControl.getCell()

      For example:

      • AIX/Linux:

          ActivitiesConfigService.checkOutConfig("/opt/act/temp","foo01Cell01")

      • Microsoft Windows:

          ActivitiesConfigService.checkOutConfig("c:/act/temp","foo01Cell01")

  2. From the temporary to which you just checked out the oa-config.xml file, open the file in a text editor.

  3. Edit the elements in the <objectStore> section of the file to set limits on the files that can be uploaded.

    • 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:

        <sizeLimits>
           <limit mimeFilenameRegex=".*\.exe">0</limit>
        </sizeLimits>
        

      Tip: 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.5 MB:

        <limit mimeFilenameRegex=".*">10500000</limit>

    • 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:

        <max-concurrent-downloads>10</max-concurrent-downloads>

  4. To remove a file upload limitation, delete the <limit> element representing the file type that you want to permit users to upload.

  5. To enable unlimited simultaneous downloads, remove the <max-concurrent-downloads> element.

  6. Save and close the oa-config.xml file.

  7. After making changes, check the configuration files back in.

  8. After restarting the Activities server, review the WebSphere Application Server SystemOut.log file to ensure that the Activities feature was able to initialize with the modified configuration.

 

Example

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.

 

Related tasks

Manage uploaded files
Checking out the Activities configuration files
Apply property changes

+

Search Tips   |   Advanced Search