Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify the path and filename of attachments

Bo Bøgvald
Contributor
February 16, 2023

Via SQL, I am trying to extract path and filename of attachments on our Jira Software Server.

After reading this article: https://confluence.atlassian.com/jirakb/locate-jira-server-file-attachments-in-the-filesystem-859487788.html I do have some questions:

#1

The article writes that <bucket> number depends on file ID number, but the examples provided use issue number: 

CEILING((ji.issuenum/10000))*10000

Also, this does not count as described. I guess it should be something like:

CEILING((fa.id/10000)-1)*10000

#2

Some files on the server seem to have another filename than the one provided in fa.filename (which is also what is seen in the UI). Specifically, like <fa.id-<fa.filename>. Any idea how to know when one filename or another is used?

 

Best Regards

Bo

1 answer

1 accepted

0 votes
Answer accepted
Bo Bøgvald
Contributor
February 16, 2023

Gosh.. I think I figured it out. We have attachments stored in three different ways:

 

Ancient

<JIRA_HOME>/data/attachments/<PROJECT>/<ISSUE_KEY>/<ID>_<filename>

Example:

<path>/data/attachments/DL/DL-1008/13195_a.png

 

Historic ('old format' in referenced article)

<JIRA_HOME>/data/attachments/<PROJECT>/<ISSUE_KEY>/<ID>

Example:

<path>/data/attachments/DL/DL-1427/13307

 

Modern

<JIRA_HOME>/data/attachments/<PROJECT>/<BUCKET>/<ISSUE_KEY>/<ID>

 Examples:

<path>/data/attachments/DL/10000/DL-5236/48246

<path>/data/attachments/DL/20000/DL-10005/74434

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.11.1
TAGS
AUG Leaders

Atlassian Community Events