How to upload attachments from the CSV file?

I have the following CSV file:

ID,"Type","Summary","State","Assigned User","Attachments"
125653,"Defect","Manager: GUI - Unable to start multiple stopped instances ","Accepted","Armen","190112.jpg"

It fails to upload the attachment. What is the workaround? What directory should the attached file be?

1 answer

JIRA CSV Importer supports only file import via URLs. So in your CSV file you have to include full URL to each of the file you want to import. Then you have to expose your files via HTTP or HTTPS. You can easily try this out using - where files can be accessible via http. In normal production environment we would expect customers to expose these files via HTTP (or HTTPS) on some internal web server.

For Windows users (tried out on Win 7 Professional) you can quite easily do that without too much hassle:

  • make sure that IIS is installed
  • put all the files you want to import into some directory
  • in IIS add this directory to a new or existing web site
  • make sure your web site is started
  • you can click on a file from a IIS management console and "browse it" - it should open a web browser pointing to this file. If your web browser successfully downloads the file - you are ready to proceed with the import to JIRA - just use the same URLs in your CSV file

This article should help you - just do not bother about security part - the best for this exercise is to allow anonymous access

file:// protocol is not supported due to security reasons - it would be possible to access any file from the server which JIRA instance is hosted. JIRA does protect local file system from being accessed. Even JIRA system admins can access normally only $JIRA_HOME directory and its subdirectories.

I've just realized that the documentation for this part of CSV importer needs improvement. That will be fixed.

Thank you, Wojciech. When I included the attachment url, JIRA added viewattachment under the Attachments and under Activity/Comments inserted the url for attachment but not file itself. Is it possible to insert the file? Then we do not need to keep the old defect tracking system just to access the attachment.

That's strange. The importer should copy the content of the files from given URLs. If it does not - that's looks like a wrong configuration or a bug in it. Could you raise a bug on and give there more details (including your cfg file, a screenshot of your field mapping screen, the etc.)?

I see the problem is in how we access the attachment. The url is


where viewattachment is the script with 2 parameters added. JIRA considers the part before ? as the url to attachment and it strips the rest. Is there any workaround?


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

From Atlassian: Confluence Security Advisory - 2019-03-20

Atlassian released a security advisory on 3/20/2019.  The full advisory is here: In a nutshe...

21 views 0 1
View post

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you