CSV Import - Attachment URL Not Importing

Sarah Shepard December 20, 2017

I have run several CSV imports with success. I added an attachment column and mapped it using an https:// link to an item in our Google Drive account. It imported but came across as "Open" or edit with no attachment. Any ideas?

 

Thanks so much!

 

4 answers

1 accepted

1 vote
Answer accepted
edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2017

Hi Sarah,

The attachments might be password protected, hence JIRA can't access them. Are you using Server or Cloud?

Sarah Shepard December 20, 2017

Cloud. 

I assumed that since I created the test ticket for myself and didn't log out, I should be able to click on an attachment link I created since I don't need to "log in" to be directed to the url. 

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2017

I meant on the Google Drive side.

Can you see the attachments on your browser using the URL and not logging in?

Sarah Shepard December 20, 2017

I see. So if I open a new browser, not logged in to Google, then no I cannot see it. It takes me to the google log in screen.

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2017

That won't work then. You can download them locally and update your attachment links as so. Either in the current directory

file://file.jpeg

or a path

file:///folder/file.jpeg


https://confluence.atlassian.com/cloudkb/importing-attachments-into-jira-cloud-using-csv-691011888.html

 

Sarah Shepard December 20, 2017

Bummer! Ok thanks so much for your help!

Sravan Kumar January 26, 2018

@edwin

I am facing the same issue, Could you please help me how could I update the file/ attachment Link to the path: file://file.jpeg?? 

I am not clear to what can be done so I could have a successful Imports with Attachments. Please Advice!!

0 votes
Aashish Gupta February 18, 2020

I uploaded the attachment on a shared location with the csv file which was supposed to be imported. Both the CSV file and image file were uploaded on the same location but when the import process was started it errored out as -
"Attachment file not found or not readable, skipping: /app_2/var/atlassian/application-data/jira/import/attachments/JIRA.png".

Just to mention the above process was tried with keeping the files on my desktop as well but it threw the same error.

Can someone please help to resolve this?

SS2.PNGSS1.PNG

Kamal Kailasa Babu March 5, 2020

is this solved?

Annie Brousseau April 20, 2020

I'm also looking for a solution to this issue. Trying to import from a JSON file. File to attach is in the same folder. My json looks like that:

....

"attachments": [
{
"name": "Attach.msg",
"attacher": "user1",
"created": "2020-04-20T09:51:12.1681238+08:00",
"description": "This is a test",
"uri": file://Attach.msg

}
]

....

Still getting the issue:

org.codehaus.jackson.JsonParseException: Unrecognized token 'file': was expecting
0 votes
P SRINIVASA RAO March 1, 2018

Hi Edwin,

Here we are migrated jira issues from one cloud instance to other,we've mapped the attachments column also,import done ,attachments are attached to the issues but i'm unable to view the attachments, Here i'm attaching the screenshot for your reference,Please provide any solution to migrate the attachments or to view the imported attachments.image.png

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2018

Hello,

You'll have to download the attachment files separately and then do a import. They won't be brought in with the CSV import. Let me know if that helps.

Screen Shot 2018-03-03 at 19.52.00.pngScreen Shot 2018-03-03 at 19.52.17.png

rbalusu3 March 22, 2018

Please add "Anyone" group to Browse Project permission in Permission schema and import the  CSV format. So while importing it will not check any authentication and download the attachment from Source and upload into Target server. I have done it and it is working fine.

 

Regards

Ravi

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2018

This did not work for us.  The attachments are uploaded but they are not viewable.

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2019

Not sure if this solution works for everyone, but we used an Extranet SharePoint site. This site had general public access so everyone could view the site.  Once we mapped out attachment URL to that public site, and before importing i checked with a personal account i could see the attachments without logging into the Sharepoint site, we imported and it worked just fine.    They key is even if its a public site, we found that the site needs no authentication at all for the attachments to import as expected.  If you have to log into a site to access the attachments or download them, then it may not work.  If you can download them without logging in, then it should work. 

0 votes
Sravan Kumar January 26, 2018

I am facing the same issue, Could you please help me how could I update the file/ attachment Link to the path: file://file.jpeg??

Tried by uploading the files through Google Drive and by the below process.. Both are throwing the same error:

  1. Attached all the Attachments into a test issue in Jira
  2. Copied the URL's of attachments
  3. Pasted the URLS in the Attachment Column in my CSV File 
  4. Imported them through CSV importer

 

 

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2018

Hi Sravan,

This process is not possible when importing from Google Drive. You'll have to get the files to your local computer and then you can use the file://file.jpeg.

Like Julie Prolhac likes this
Sravan Kumar March 23, 2018

Edwin,

This has worked: Thank you! we are migrating huge data.. about 10,000 issues with more than 2000 attachments in it.. Is there a way to bulk import the attachments? saving each and every attachment locally for 2000 attachments will take it for ever.. I was looking if there is any workaround for this..

 

Please Advice.

Thank You!! 

Like Wayne Lu likes this
Julie Prolhac July 5, 2019

@[deleted] @edwin : could you please help me as well? I am trying to upload several JIRA tickets using Service Desk cloud in csv format with attachments from local computer. Edwin you presented the solution for files located in current directory
file://file.jpeg
or a path
file:///folder/file.jpeg

But I don't manage to do it. In the csv file I am using following link format to a file located on my computer. For example:
file:///C:/Users/Julie/Documents/81_JIRA/image.jpg

What am I doing wrong?

Thank you so much in advance!
Julie

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2019

Hi @Julie Prolhac ,

The URI looks correct for a Windows environment. I'll have to test an actual import on Windows to confirm.

Have you tried from the same directory?

Julie Prolhac July 8, 2019

Hi @edwin ,

Yes i tried from the same directory where the ticket upload csv file was. It is located in C:/temp and the file iiself is user.png. I tried both entries:
file:///C:/temp/user.png
file://user.png

but both returned following log:
Attachment file not found or not readable, skipping: /data/jirastudio/jira/home/import/attachments/C:/temp/user.png

Would you know what i am doing wrong? any way to change the first part of the path that is added automatically? /data/jirastudio/jira/home/import/attachments/

Thank you for your time!!

Julie

edwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2019

@Julie Prolhac ,

It's not possible to remove the first part of the path. This is the path where Jira is looking for attachments. Not where the CSV file is located.

When you specify

file://user.png

It's looking for

/data/jirastudio/jira/home/import/attachments/user.png

So you'll first import the attachments and then reference them in the import. 

Julie Prolhac July 18, 2019

Understood now! thank you @edwin !

Like edwin likes this
Manju A September 20, 2019

@edwin - I did try placing the file under the location 

"/data/jirastudio/jira/home/import/attachments/"

but still i am getting the Exception as File not found Exception. My Jira is in cloud hosted.

Does that mean i have to load all my attachments to the cloud server where Jira is installed? 

I need all attachments to be uploaded as part of CSV import, from my local system and not from cloud. Any options would help.

Thanks,

Manjunath

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2019

@Manju A if using jira cloud atlassian hosts your instance and you cant access the server.  

I got this working by hosting all the file on a public site that reachable with no authentication.  Once imported, make sure to delete the files from this site

And when i say public site, i literally mean anyone in the world can see the attachments if they have the URL. 

Store the attachments locally did not work for me since we are on a work domain and Jira cant authenticate to it so they could never access the file locally on my machine. 

Manju A September 20, 2019

Thanks Julian for the quick response. Publicly available site is Scary and cant go with it since Org. policy doesnt allow it.

I was thinking another option "using Jira API" to upload files. Would that work? Before I can invest time on this API approach would like your blessings :-)

Appreciate your response.

Manjunath

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2019

I have never used the API to do this.  We have sharepoint here in our org and we created and external document library that allowed anonymous access which worked for our needs.  Sorry i cant help more on the API side. 

Suggest an answer

Log in or Sign up to answer