Setting maximum sizes on media, pages, and attachments
You can set maximum sizes for media, pages, and attachments
in the wikis-config.xml
properties file.
Before you begin
To edit configuration files, you must use the IBM® WebSphere® Application Server wsadmin client. For more information, see Starting the wsadmin client.
Many commands require an ID as an input parameter, including library IDs, user IDs, policy IDs, and file IDs. You can find an ID by using special commands. For example, when you run the WikisMemberService.getByEmail(string email) command, where you provide a user's email address as input, the output includes the user's ID. You can also find IDs by using feeds. For more information, see the IBM® Connections API documentation.
About this task
You can set maximum sizes on media, pages, and attachments to control the size of these individual objects. For more information, see Setting maximum sizes on libraries.
Pages are a type of media so the maximum setting for pages cannot be larger than the maximum setting for media. Attachments have no relationship to media or pages, and can be any maximum size. However, if you allow users to attach large files you must make sure that network and browser timeout settings give users enough time to download the files.
Procedure
- Start the wsadmin client.
- Start the Wikis Jython script interpreter.
- Optional: To view the current configuration
settings, use the following command:
WikisConfigService.showConfig()
- To set a maximum size (in KB) for media, pages, and attachments,
use the following commands:
WikisConfigService.updateConfig("file.media.maximumSizeInKb", "<number_of_kilobytes>")
WikisConfigService.updateConfig("file.page.maximumSizeInKb", "<number_of_kilobytes>")
WikisConfigService.updateConfig("file.attachment.maximumSizeInKb", "<number_of_kilobytes>")
Note: For better performance, set the maximum size of attachments to 2 GB. Files that are larger than that are likely to reach browser or server limitations. The following limits show the default maximum size for different types of files:- Media: 512 MB
- Pages: 1 MB
- Attachments: 75 MB
-
Check in the configuration file.Note: You must check in the file during the same wsadmin session in which you checked it out. For more information, see Applying Wikis property changes.