Storing Jira attachments in S3: incompatible APIs

Hi community,

In Jira 9.11 we released a preview of a feature that will allow customers to store their attachments in S3, behind a dark feature flag. This follows the recently released feature that allows customers to store avatars in AWS S3. The compatibility of some Jira APIs could not be maintained when this feature is enabled as they expose filesystem-specific concepts such as java.io.File. These classes and methods were already deprecated in Jira 9.7, and most have alternatives documented in the javadocs. In general, attachments should always be accessed through the AttachmentManager as this ensures compatibility regardless of where the files are stored.

The official release of this feature will be in the future in Jira 10.0, that said, we recommend updating any usages of the below APIs as soon as possible to ensure compatibility for any customers trialing this dark feature. The APIs that will not be compatible with the feature are listed below.

Item Reason for Incompatibility Alternative

Item Reason for Incompatibility Alternative
com.atlassian.jira.config.util.AttachmentPathManager Exposes the path attachments are stored at. Use the com.atlassian.jira.issue.AttachmentManager directly.
com.atlassian.jira.util.AttachmentUtils Returns java.io.Files for attachments and thumbnails that are filesystem specific and allow bypassing AttachmentManager. Use com.atlassian.jira.issue.AttachmentManager or com.atlassian.jira.issue.thumbnail.ThumbnailManager directly.

There are other APIs that have been marked as to be removed in Jira 10 in the javadocs which will continue to function but will be removed in Jira 10.0. These are listed below.

  • Some methods of com.atlassian.jira.issue.AttachmentManager
  • com.atlassian.jira.util.AttachmentConfig

Regards

Atlassian Data Center Team

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.