Import issues with Attachemnts

Capture.PNGHello All,

I am trying to bulk import with attachments, to start with I just tried and tested with 1 attachment, and it throwing me the error.

I placed the attachment in the imports folder and gave the location in the attachments column but its not taking it: M I giving the location correct? Please see the below Image and advice.

 

Thank You!!

1 answer

Check this other question. I answered this a couple days ago.

Thank you Dave!

basically what I did was added attachments to a test issue and placed their respective URL's in the attachments column. The attachments got imported but when I tried to view them it says cannot load the image. Please see the image below:Attach Error.PNG

Can you download the attachment in a browser if you paste in the URL from the CSV? I'd also test it using curl from the Jira server operating system to verify it's not a connectivity issue.  I've done this many times and it definitely works, as long as Jira can access the URL. It does need to be a full URL in the CSV file and not just a relative link.

No- I cannot!! when I copy pasted the url in the browser its asking for Jira's Credentials: Like I said I attached all the attachments to a test Issue in Jira, then copied the file locations into the Attachments Columns in the CSV file: So I am guessing due to credentials issue its throwing the error? So where else can I upload the attachments and can get the URL please?

Process I followed is:

  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

I tried the Google Drive upload, import too by copying the google drives url.. Still throwing the same.. and No I cannot download/ View the file when I paste the URL into the browser if I am not signed in:

So the question is where can I upload the files and get a URL which doesn't need me to sign-in and gives me the option of uploading the files?

Try this.  Copy the directory that contains all of the attachments in to the <jira_installation_dir>/atlassian-jira/images directory.  For example, if your attachments are all in a directory called "attachments," it would be something like this directory.

/opt/atlassian/inst/jira/atlassian-jira/images/attachments

The URL to access an individual attachment would be something like this.

http://jira.domain:8080/images/attachments/atlassian-jira-logo-large.png

Doing it this way, you use the Tomcat built in to Jira as your webserver. Make sure to change ownership of the attachments directory to the user that Jira is running as.

Its still not working!! Been trying since a week now.. So lets say I place an attachment named "jan1-15" for example in the attachments folder what will my URL be to access that? I am testing on the Jira which is installed in my PC accessible at http://localhost:8080/

The location I am saving the attachment is

C:\Program Files\Atlassian\JIRA\atlassian-jira\images\attachments

 

Please Advice. Thanks in Advance!!

 

Capture2.PNG

Below are the URL's used in the attachments column.. Tried one by one.. none of them worked

http://localhost:8080/images/attachments/atlassian-Jan1-15.png

http://localhost:8080/images/attachments/Jan1-15.png
http://jira.domain:8080/images/attachments/Jan1-15.png
http://jira.domain:8080/images/attachments/atlassian-Jan1-15.png

What happens when you point a web browser at the attachment? It seems that the URL would be: http://localhost:8080/images/attachments/Jan-1-15.png

If a web browser on that server can download it, the CSV import process should work. 

It does nothing.. I get an empty screen.. Tried in different browsers.. all does the same. 

Please see the imageScreen.PNG

Actually, I think I may see something. Can you confirm if there is a space in the Jan1 file name? If there is, you will need to replace the spaces with "%20" in the URLs. Check out how HTML URL Encoding works for more details.

It would be easier to write a script that will go through and replace all spaces in filenames with an underscore ( _ ) or something similar. Any other non-ASCII characters in URLs will also need to be replaced with the appropriate encoding character.

Assuming I'm right, the URL would be something like this:

http://localhost:8080/images/attachments/Jan%201-15.png

You need to get this working in a web browser first.  Once you have that working, then move on to formatting the CSV with working URLs.

Nah!! Spacing is not an issue tried accessing that in the browser its doing the same.

To be sure I renamed the file name to Jan(without spaces and any special characters) and tried to access it at..

http://localhost:8080/images/attachments/Jan.png

and it still did the same.. Did a test import and it did not work.

You need to get this working in a web browser. Once you have that working, move on to the CSV file.  If it doesn't work in a web browser, it won't work on a CSV import.

I would check the catalina.out log file for errors.  You also need to make sure the files are owned by the user Jira is running as, or at least are readable globally. Worst case, set up a dedicated web server and stick the attachments there.  

I've used this exact method a number of times without issue.

If you still aren't having any luck, I recommend reaching out to an Atlassian Partner.  We do this stuff for a living, so we have proven methods for migrations of this type.

Daniel Eads Community Champion Feb 02, 2018

Hi Sravan!

After reading through the back and forth, I just want to second Dave's suggestion to reach out to a partner. It looks like you are having quite a bit of trouble with something that's usually pretty straightforward. Any Atlassian Partner will be able to troubleshoot this much more quickly over a screenshare than the process you've had this week online. While we try to provide as much help as possible on Community, there does sometimes come a point where paying a partner is going to save you a lot of time and frustration. I think you've hit that point!

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

20,630 views 2 7
Join discussion

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