This article describes how to synchronize attachments.
With Exalate, you have full control over attachment synchronization.
You can define the sync behavior for attachments in different ways. For example:
- filter what attachments to send by file type or size
- sync attachments from the public comments only
The maximum attachment size that you can synchronize depends on a couple of factors:
- the attachment size limit on both instances (you can configure the max attachment size in Jira)
- instance HTTP/HTTPS connection timeouts
We've tested the synchronization of attachments with the size up to 1 GB, which worked without any issues, bigger attachments should not be a problem either.
When sending attachments, you need to remember, that not all the attachments have to be sent over.
You can use the groovy collection methods to control the collection contents:
Send all the attachments
- Send only .pdf files
send only attachments mentioned in public comments and handle names with special characters
You can define how to create issue attachments, received from the other side.
Check some examples below:
- Merge attachments using attachmentHelper.mergeAttachments . It's is the most common case, which is included in the default sync rules.
- Create new attachments, received from the source side
- Add all received attachments to the local issue and change the attachment name. You can manipulate attachments via groovy collection methods to apply any specific behavior.
- Gather statistic from the attachments
- Make the issue attachments the same as the ones received from the remote instance
This will remove all the attachments, which are not present on the remote issue replica. Use with caution.