Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA Service Desk Attachments

Morning All

Hope someone can help.

We have started to use JSD but not via the portal, customers send in requests via email. When i put an attachment on a ticket and the customer gets the email notification back with the attachment, the link for the attachment seems to indicate they need access to the portal which currently they dont have. So they cant actually view/download the attachment.

Any ideas, thanks.


7 answers

2 accepted

3 votes
Answer accepted
Deleted user Oct 10, 2017

Hi John,

JSD email notifications to customers that contain attachments require the customer to click a link and login to view the attachment, currently there is no built in way to attach the issue attachment to the email itself. A suggestion is already open with Atlassian to implement this: JSDSERVER-3371

Currently the only way to attach the file to the actual email is via a third-party mail handler plugin such as JEMH (I work for the vendor) which is capable of gathering all the relevant issue attachments and attaching them directly to email notifications.

Kind Regards,


thanks for the reply

Like benvindo.marial likes this

hi, it seems this workaround does not work

does it work for you ?   

sorry I had to replay to the next message

Deleted user May 29, 2018

JEMH is a replacement for the built in Jira Service Desk notifications, simply installing JEMH will not be enough to get attachments attaching directly to emails. You will need to configure JEMH so that all of your JSD notifications are sent via JEMH.

A quick start guide for JEMH can be found here: JEMH Quickstart Guide

Support for the product is available via:


We faced with the same problem and found no good solution better than the dirty trick, described below. Do not do it if you are not sure! Also the solution assumes there is no sensitive data in the attachments, as it bypasses the access control completely.

Our Jira Service Desk runs on Ubuntu+Apache2 and stores the attachments in /var/atlassian/application-data/jira/data/attachments/HELPD (HELPD is service desk application name)

1. Add www-data user to jira group: 

sudo usermod -a -G jira www-data

2. Create a symbolic link to the attachments dir from somewhere else: 

ln -s /var/atlassian/application-data/jira/data/attachments/HELPD /var/www/helpdesk_attachments/

3. Some sub-directories in /var/atlassian/application-data/jira/data/attachments/HELPD path are accessible for jira user only. Check all subdirs and change their permissions (if needed) with

chgrp jira /var/atlassian/application-data/jira/

chmod 750 /var/atlassian/application-data/jira/


Now you should be able to list attachments file structure with a command like

ls -R /var/www/helpdesk_attachments/*


4. In apache2 config of your site add the lines (it assumes Jira is configured with /jira URL prefix):

ScriptAlias "/jira/secure/attachment" "/var/www/helpdesk_attachments/index.php"

ProxyPass /jira/secure/attachment !


ProxyPass /jira http://localhost:8040/jira
ProxyPassReverse /jira http://localhost:8040/jira

5. Create PHP script /var/www/helpdesk_attachments/index.php with the content


$pieces = explode("/", $_SERVER['REQUEST_URI']);
$size = sizeof($pieces);
$files = glob(getcwd() . "/*/*/*/" . $pieces[$size-2]);

$filepath = $files[0];


$filename = $pieces[$size-1];
$prefix = $pieces[$size-2] . '_';
$filename = preg_replace("/^$prefix/", '', $filename);
$mime = getMime($filename);

  header('Content-Type: ' . $mime);
    header('Content-Disposition: attachment; filename=' . $filename);

    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');

    header('Content-Length: ' . filesize($filepath));


function getMime( $filename ) {
$types = array(
    'ai'      => 'application/postscript',
    'asc'     => 'text/plain',
    'avi'     => 'video/x-msvideo',
    'bin'     => 'application/octet-stream',
    'bmp'     => 'image/bmp',
    'class'   => 'application/octet-stream',
    'css'     => 'text/css',
    'csv'     => 'text/csv',
    'doc'     => 'application/msword',
    'dtd'     => 'application/xml-dtd',
    'eps'     => 'application/postscript',
    'gif'     => 'image/gif',
    'htm'     => 'text/html',
    'html'    => 'text/html',
    'ico'     => 'image/x-icon',
    'jpeg'    => 'image/jpeg',
    'jpg'     => 'image/jpeg',
    'js'      => 'application/x-javascript',
    'json'    => 'application/json',
    'mathml'  => 'application/mathml+xml',
    'mov'     => 'video/quicktime',
    'mpeg'    => 'video/mpeg',
    'mpg'     => 'video/mpeg',
    'pdf'     => 'application/pdf',
    'png'     => 'image/png',
    'ppt'     => 'application/',
    'ps'      => 'application/postscript',
    'qt'      => 'video/quicktime',
    'rtf'     => 'text/rtf',
    'svg'     => 'image/svg+xml',
    'svgz'    => 'image/svg+xml',
    'swf'     => 'application/x-shockwave-flash',
    'tar'     => 'application/x-tar',
    'tif'     => 'image/tiff',
    'tiff'    => 'image/tiff',
    'tsv'     => 'text/tab-separated-values',
    'txt'     => 'text/plain',
    'xhtml'   => 'application/xhtml+xml',
    'xls'     => 'application/',
    'xml'     => 'application/xml',
    'xsl'     => 'application/xml',
    'xslt'    => 'application/xslt+xml',
    'zip'     => 'application/zip',
    'eml'     => 'message/rfc822'

$path_info = pathinfo($filename );
$ext = strtolower($path_info[extension]);
$mime = $types[$ext];
if ( $mime === null ) {
$mime = "text/plain";

return $mime;


In the code there is a redundant getMime() implementation. For some reason on our system the standard PHP's mime_content_type() does not work, so it was easier/safer not to troubleshoot the prod system, but to implement a minimalist replacement.

6. Add error handling to the index.php if you find it is needed.

7. restart Apache with sudo service apache2 restart

Ingenious, Nice man!

@Igor Repinetski Is there any way this could work for Cloud? Thank you! 

Like David Valle likes this
Pushpkant Garg Community Leader Mar 03, 2021

On Cloud it is available by default. Attachments will be downloaded automatically.

Apart from the other replies, you can also use Mail Attachments for JIRA Service Desk that has been released exclusively to address this problem:

@Jose León Serna this addon still displays a link to the portal (in the e-mail send to the customer). Rendering it useless.

Really? Then I am unsure it fits my needs anyway. On the atlassian marketplace it says: "All attachments are included as an actual e-mail attachment within the e-mail notification so that the attachment can be downloaded directly from the e-mail without having to login to the instance."
But should it be understood in the way that there is a link that allows you to download it, but you will have to press the link to do so? It is not just "in" the e-mail just as if I sent a mail to you with an attachment in?

Like Alexander_Drobyshevsky likes this
Deleted user Dec 20, 2018

I cannot speak for the other app mentioned above but JEMH does attach the attachments to notification emails directly as you describe, you would need to switch to using JEMH for your Service Desk notifications to achieve this.

Like Host Zara likes this

Mail Attachments for Jira Service Desk includes it directly in the email. We have moved this functionality into [Notification Assistant for Jira|]

Have you tried a cheap "Email this issue" add-on?

We're in the same boat (emailing from JSD, but not using the portal), so we had to build a custom file uploader through AWS, build in a new attachment location in our issue screens, and disable the built-in attachment option so our users don't get confused. This is working for outbound emails from JSD - the customer still receives a link, but it's pointed at the AWS location and not our network, so they can access the file(s) without logging in.  

Hi all,


You can add regular files and inline attachments (to comment) to email notification using our add-on Raley Email Notification

Here's an article explaining how to do that

Hi John;

Workaround : Do not use "space" or characters like  (+%&/-) in the attachements/files name.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

258 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you