Setting file attachment limits

Setting attachment size limits

You can set the following two file attachment size limits:

  • Maximum single attachment size

    This value limits the maximum size of a single attachment.

  • Total attachment size

    This value limits the total size of all attachments in an attachment container, such as an incident record.

You can set these attachment size limits in the following ways:

  • Specify the attachment size limit for the entire system in the system information record
  • Specify the attachment size limit for a particular operator in their operator record
  • Specify the attachment size limit for the attachment container on a form by using Forms Designer
  • Specify the attachment size limit for individual attachments by using the MaxAttachUploadSize and MaxTotalAttachUploadSize parameters.

    Note These parameters are located in the web.xml file. The default value of the MaxAttachUploadSize parameter is 10 MB, and the default value of the MaxTotalAttachUploadSize parameter is 50 MB.

If you do not specify a value in one of these places, there is no limit on the size of attachments, and users can add attachments as large as the database record will hold. If you specify the attachment size limits in more than one place, then the order of precedence is:

  1. The value from the attachment container
  2. The value from the operator record
  3. The value from the company record
  4. The values of the MaxAttachUploadSize and MaxTotalAttachUploadSize parameters

As an example, for the maximum size of a single attachment, if the company record limit is set to 1,000,000 bytes, the operator has a limit set to 2,000,000 bytes, and the container has a limit of 3,000,000 bytes, the person will be able to store a 3,000,000 byte attachment in the container (the attachment container property overrides the other two limits). A different operator without a limit, storing attachments in a different container with no limit set, would only be able to save a 1,000,000 byte attachment.

Note File size validation is not performed at the widget level on the web service. Therefore, it is possible to attach a file that exceeds the configured size limits by using the web service.

Setting attachment count limits

You can limit the number of individual files that can be attached to each record in Service Manager. To do this, configure the maxattachmentcount parameter. By default, the value of this parameter is 100 files.