Documentation for JIRA 6.4 (This documentation includes the project navigation sidebar). Not using this? See below:
(JIRA 6.4 without sidebar documentation | JIRA 6.3.x documentation | JIRA Cloud documentation | earlier versions of JIRA)

Skip to end of metadata
Go to start of metadata

When file attachments are enabled, your users will be allowed to attach files and screenshots to JIRA issues. This requires space on the server for storing the attachments.

File attachments are enabled by default. If you wish, you can configure the way JIRA handles attachments, or disable this feature altogether.

(warning) Attachments are not stored in JIRA's database and so will need to be backed up separately.

Note:

  • your users must also have the Create Attachments permissions to attach files to issues
  • to allow users to attach a file when creating a new issue, you need to ensure that the Attachment field is not hidden within the field configuration(s) associated with the specific issue type(s).

Configuring attachment settings

  1. Log in as a user with the JIRA System Administrators or JIRA Administrators global permission.
    (info) If you do not have the JIRA System Administrators global permission, you will not be able to enable or disable file attachments.
  2. Choose > System. Select Advanced > Attachments to open the Attachment page, which states whether attachments are on or off.
    (tick)Keyboard shortcut: g + g + start typing attachments


  3. Click the Edit Settings button, which opens the Edit Attachment Settings dialog box:
  4. In the Attachment Path field, choose the Use Default Directory option. If you see more attachment path options than what is shown in the screenshot above, please refer to the note below.
    (info) As mentioned above, if you have not logged in as a user with the JIRA System Administratorsglobal permission, then this option will not be available to you.
  5. In the Attachment Size field, specify the maximum attachment size. The default is 10485760 bytes (10 MB). The maximum attachment size is 2147483647 bytes (2 GB).
  6. (Optional) In the Enable Thumbnails field, ensure that ON is selected if you wish to display image file attachments as thumbnails (or miniature previews) when viewing an issue. When this setting is enabled, JIRA automatically creates thumbnails of the following types of image attachments:
    - GIF
    - JPEG
    - PNG
    Please refer to the info note below for more information about thumbnails. If you use Linux, please refer to the Linux note below.
  7. (Optional) In the Enable ZIP Support field, ensure that ON is selected if you wish to view the contents of zip files attached to an issue and allow all files attached to an issue to be downloaded as a single ZIP file.
  8. Click the Update button to update JIRA's attachment settings.
    To attach files to issues, the appropriate users, groups or project roles must first be assigned the Create Attachments permission for the relevant project(s).
    To allow these users or group/project role members to delete their own attached files from issues, they must also be assigned the Delete Own Attachments permission for these projects too.
    There is no need to proceed any further if:
    - the permission schemes used by your project(s) already have the Create Attachments (and Delete Own Attachments) permission, or
    - your project(s) use JIRA's built-in Default Permission Scheme.
    However, if you wish to configure these permissions, proceed with the steps in the section below.

Configuring create/delete attachment permissions

  1. Choose > Issues. Select Permission Schemes to open the Permission Schemes page, which displays a list of all permission schemes in your JIRA system and the projects that use each scheme.
    (tick)Keyboard shortcut: g + g + start typing permission schemes
  2. For each relevant permission scheme:
    1. Click the Permissions link associated with the relevant permission scheme to edit that scheme's permissions.
    2. On the Edit Permissions page, locate Create Attachments within the Attachment Permissions section and click the Add link.
    3. In the user selection options on the right of the Add New Permission page, select the relevant (groups of) users or roles and then click the Add button.

      (tick) To allow these users or group/project role members to delete their own attachments, do not forget to assign them the Delete Own Attachments permission too.

(info) Choosing a custom Attachment Path:

  • If you upgraded JIRA with an XML backup from a JIRA version prior to 4.2 and used a custom directory for your attachment path, you can choose between using this custom directory (which cannot be edited) or the default directory for your attachment path location. However, once you switch to using the default directory, you can no longer choose the custom directory option.
  • The default directory location is the data/attachments subdirectory of the JIRA Home Directory.
  • To be able to change the default path, create a symbolic link to the new path.


(info) More information about thumbnails:

  • You can configure the Issue Navigator column layout to display the thumbnails in an Images column.
  • All thumbnail images are stored in JPEG format in the attachments directory, together with the original attachments. The thumbnail images are denoted by '_thumb_' in their file names.


(info) Thumbnail image generation on Linux:

  • Your system must have X11 support. This web page details the minimum set of libraries needed to use JDK 1.4.2 under RedHat Linux 9.0.
  • The following java system property must be set: -Djava.awt.headless=true

Advanced configurations

You can implement the following advanced configurations to modify the way JIRA handles attachments. However, these are not accessible through JIRA's attachment settings (above). One of these advanced configurations can be modified as an 'Advanced Setting' in JIRA's administration area, although the remaining two are implemented by defining properties in your jira-config.properties file.

Configuring thumbnail size

By default, thumbnails are 200 pixels wide and 200 pixels high. To change the dimensions of thumbnail images:

  1. Stop JIRA.
  2. Edit the jira-config.properties file in your JIRA Home Directory.
    (info) See Making changes to the jira-config.properties file for more information.
  3. Edit the values of the following properties:
    • jira.thumbnail.maxwidth — thumbnail width in pixels
    • jira.thumbnail.maxheight — thumbnail height in pixels
      (info) If neither of these properties exist in your jira-config.propertiesfile, add them to the file. For example, specify the following for a thumbnails that are 100 pixels wide:

      jira.thumbnail.maxwidth = 100
  4. Delete all existing thumbnail images within the attachments directory (that is, those containing '_thumb_' in the filename).
  5. Restart JIRA.

After restarting JIRA, all thumbnails will be recreated automatically using the new dimensions.

Configuring ZIP-format file accessibility

By default, JIRA allows you to access common ZIP-format files, with file extensions like '.zip' and '.jar' (Java archive files). However, there are numerous other ZIP-format files to which JIRA does not permit access by default. You can permit access to these files by doing the following:

  1. Stop JIRA.
  2. Edit the jira-config.properties file in your JIRA Home Directory.
    (info) See Making changes to the jira-config.properties file for more information.
  3. Remove the extensions from the jira.attachment.do.not.expand.as.zip.extensions.list property of the file types whose contents you wish to access in JIRA.
    (tick) If this property does not exist in your jira-config.properties file, add the name of this property, followed '=', followed by the content of the <default-value/> element copied from your JIRA installation's jpm.xml file. Then begin removing the exensions of file types whose contents you wish to access in JIRA.
  4. Restart JIRA.

Configuring the number of files shown in the content of ZIP-format files on issues

By default, JIRA shows a maximum of 30 files in the content of ZIP-format files attached to an issue. To change this maximum value:

  1. Access JIRA's Advanced Settings page. (See Configuring Advanced Settings for more information.)
  2. Edit the value of the jira.attachment.number.of.zip.entries property by clicking the existing value and specifying the maximum number of attachments you want to show on an issue.
  3. Click the Update button to save the new value in the JIRA database.

 

 

 

 

 

19 Comments

  1. Anonymous

    Hi,

    When creating an issue in JIRA i want the attachment should be automatically attached on create issue screen. So where i can configure this?

    Thanks in Advance.

  2. Anonymous

    I've pushed a question to Atlassian Answers regarding what admins are experiencing as acceptable boundaries before experiencing somewhat and then significant degradations in performance: 

    https://answers.atlassian.com/questions/49244/when-setting-a-max-size-for-attachments-in-jira-what-are-people-experiencing-as-boundaries-where-performance-somewhat-and-then-significantly-degrades

  3. Anonymous

    How can i include new attachment formats into confluence?

  4. Anonymous

    is there any limitation of number of attachments JIRA can handle ?

     

  5. Hi,

    Is there really no way to change the custom attachment path? Our current path will soon be decommissioned and we want to move it to another path.

    Please advise.

    Thanks!

    1. Hi Lester, 

      May I suggest that you open a support ticket: https://support.atlassian.com/browse/JSP? Our friendly support team will try their best to help you. – Regards, Lingbo

  6. Hi,

    Is there anyway to change the format that a thumbnail of an attachment is saved in? 

    In our instance of JIRA image thumbs are always saved as 'PNG' and I haven't yet found a setting to be able to change this , and for some work I am doing we could really do with the thumbnails being JPEG . This also doesn't match with the documentation above which states thumbs are always saved as 'JPEG', which from my experience is not the case. Am I missing something here or is it just  a typo? (wink)

    Many thanks!

  7. Anonymous

    Is there a way to restrict what types of attachments can be uploaded - some kind of method to bar certain file types?

  8. Anonymous

    I need that an anonymous user can attach files, but I cannt give him Browser permission.

    How can I do that?

  9. Anonymous

    Hi There,

    During the restore process where do we need to copy the attachments. i.e to data directory or to import directory.?

     

  10. Anonymous

    Hi, is there a way to display attachment's thumbnails when the user mouseover the issue link?

  11. Anonymous

    How can a user specify the mime type of the attachment?

     

  12. You can also move your "JIRA HOME" directory to another location

    1. to create a NTFS partition on your network disk
    2. mapped on the Windows server with by assigning a drive name,
    3. Shutdown JIRA
    4. move the whole JIRA home directory on the mapped drive,
    5. Change the home directory setting by running the binary config.bat in the bin folder of JIRA instance.
    6. Restart JIRA.
  13. Is there any way to avoid duplicate file attachments?

  14. Is there any way to avoid duplicate file attachments?

  15. Is it ever going to be possible to store attachments in the database, just like with Confluence?

    1. This is what I would like to see too.  To get a consistent snapshot of the system all of the dynamic data needs to be housed in the database.  The home and install directory aren't a problem as they are not dynamic, but attachments is.

  16. We have to delete attachments each time to add a new version it doesn't automatically track updates to attachments. Is this fixed in 6.4?