Attachment storage
You can use an S3 storage, for example in the AWS cloud, for case attachments and inline images contained in comments and emails in the case history. This reduces the size of the ConSol CM database.
Contact and resource attachments and inline images in rich-text fields are not covered by this change.
Available settings
The following settings are available for configuring the attachment storage:
- S3 storage enabled: Enables background synchronization and processing of files stored in S3-compatible storage. Set to True to start using S3.
- S3 endpoint: Base URL of the S3-compatible storage service used for attachment operations.
- S3 region: Region identifier used when connecting to the configured S3 bucket.
- S3 bucket: Name of the bucket where attachments are stored and processed.
- S3 credentials mode: How S3 credentials are resolved. Static uses the configured access key and secret key. AWS IAM / Pod Identity resolves credentials from the AWS default provider chain (EKS Pod Identity, IRSA or instance profile) and requires no keys.
- S3 access key: Access key used to authenticate requests to the S3-compatible storage.
- S3 secret key: Secret key paired with the access key for S3 authentication.
- S3 path style enabled: Use path-style bucket addressing instead of virtual-hosted-style requests.
- Synchronization thread polling seconds: Defines how often synchronization workers check for new attachments to process.
- Synchronization batch size: Defines how many items a synchronization worker takes in a single processing batch.
- Database attachment scanner thread polling seconds: Defines how often the attachment table scanner checks for new attachments to process.
- Database attachment scanner batch size: Defines how many ConSol CM attachments are processed at once
- Attachment minimal size: Attachment minimal size (in kilobytes). Below this value, the attachment is stored as a local attachment in the database
- Attachment minimal age: Attachment minimal age (in days). Younger attachments will not be sent to the S3 storage
- Synchronization threads: Specifies the number of parallel synchronization workers processing the CM-S3 synchronization queue.
- Processing lock timeout seconds: Determines how long a processing lock is kept before it can be considered expired.
- Deletion batch size: Sets how many attachments can be removed in one deletion batch.
- Script name: Optional. Select a script of the type Attachment storage to define which attachments should be transferred to the S3 storage. This is particularly useful for testing the S3 integration with specific cases.
Tasks
Configuring S3 storage
Please proceed as follows to configure the S3 storage:
- Provide the access information of your S3 storage (endpoint, region, bucket, access key and secret key).
- Decide which attachments should be transferred to the S3 storage. You can set a minimum size and age for transfer if desired. By default, all attachments are transferred.
- Set S3 storage enabled to True.
- Test the connection by clicking the Test connection button.
- Click Update to save your settings.
The synchronization starts immediately after saving the settings.
Testing the synchronization
You can select a script of the type Attachment storage in the Script name field if you want to test the transfer with a single ticket's attachments before starting the regular automatic transfer.
The following example shows how to transfer the attachments of a single ticket:
TicketContentService.synchronizeContentToExternalStorage([600123, 600456, 600789] as Long[])