Importing attachments into Jira Cloud using CSV External System Importer

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When migrating between two Jira Cloud sites using the External System Import with a CSV file, you may get an error when loading an attachment of a migrated issue.

In case of an image, the first thing you'll note is that the thumbnail is broken:

Then, when clicking on it you'll get an error: 

Cause

This happens because the CSV file comes with references to attachments that may be hosted on an instance that is not publicly accessible, which is the case for most customers. See an example below:

14/Feb/19 3:53 PM;admin;image.png;https://mysite.atlassian.net/secure/attachment/10000/image.png

Resolution

In order to make this work, the user importing the CSV file to the target site needs access to the source site (and the issue/s being imported), then generate and add an API token to the URL in the CSV to authenticate to the instance. Please check the "Resolution section" to better understand how to proceed.

See an example below of the same attachment reference, now with authentication details. Note that the '@' symbol on the email address should be replaced with the HTML character '%40', followed by a colon and the API token. Finally, put an '@' symbol just before the hostname of your Cloud site. The rest of the URL will stay the same.

14/Feb/19 3:53 PM;admin;image.png;https://user%40domain.com:<API-Token>@mysite.atlassian.net/secure/attachment/10000/image.png


If the source JIRA site is a JIRA Server (self-hosted) instance

Instead of using your JIRA Cloud Email Address and API-Token, you should use your JIRA Server Username and Password instead. For example,

14/Feb/19 3:53 PM;admin;image.png;https://<JIRA-Server-Username>:<JIRA-Server-Password>@myjirasite.com/secure/attachment/10000/image.png



Description
This KB describes the steps to workaround migrating attachments from a Jira cloud site to another Jira cloud site using the CSV external system importer. 
Product
Jira core, Jira software, Jira Service Desk

Last modified on Apr 19, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.