attachments directory in Jira

Samar Elsayed June 11, 2021

Hi

 

there is something I need to understand about the hierarchy of attachments directory, normally the issues attachments exist under /attachments/key/10000/  but there are cases where the issues attachments directories exist directly under /attachments/key/ as shown below

 

Capture.PNG

 

and when I look into each one of them ( except for 10000 directory ), I find each directory is actually empty so when this case happens exactly ? as I need to find the projects that has no attachments 

 

@Alexey Matveev I would like to hear your opinion too if you dont mind

 

thanks

2 answers

0 votes
Nic Brough -Adaptavist-
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.
June 13, 2021

Stop looking at the directories, they're not intended to be used like this.

The only thing you  should be doing with the directories is backing them up.  They're not there for you to read outside the application.

Hugo Navia
Contributor
February 28, 2024

We are dealing with a situation where this is actually important.

There is a project with over 60TB of attachments and we will need to turn them into links in the projects as the directory has grow to much. the problem is that we need to rename the attachments back to their original names and generate a url that allow us to download the file anyway with the original name instead the id.

The problem, we need to deal with hundreds if not thousands of directories that are affected like this.

Any idea?

Nic Brough -Adaptavist-
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.
February 28, 2024

Welcome to the Atlassian Community!

You will need a script that can read over all your attachments and extract their names alongside their file ids, then (at least) give you a simple mapped list of name, version, and the exact path and file name.

Hugo Navia
Contributor
February 28, 2024

Yeah the script is not an issue. the issue comes with the issue directories outside of the 10000, 20000, 30000 directories, basically, the ones that are at the root of the ProjectKey directory and not inside a "numbered" directory.

 

No idea why, in some cases, some attachment directories are created in the root of the projectkey directory.

Nic Brough -Adaptavist-
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.
February 29, 2024

Jira doesn't create direcotories outside the issues.  I suspect you have an app that does project-level attachments.

Hugo Navia
Contributor
February 29, 2024

Hey Nic,

Using the screenshot attached to this post, you can see that Jira actually did created some directories for attachments outside the x0000 directory.

I've seen this situation happening before. This is what I'm trying to understand.

 

Kind regards.

Nic Brough -Adaptavist-
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.
February 29, 2024

What app are you using to do project level attachments?  Can you see what is in the files attached at that level?

Hugo Navia
Contributor
March 11, 2024

At the moment we are seeing the server attachment directory through a shared screen so I can't investigate much.

I will try to provide more information as soon as possible.

0 votes
Payne
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.
June 11, 2021

Odd behavior. We have 26 projects, and none of them have attachments directly in the key directory; they're all in 10000, 20000, etc. subdirectories. Further, I find no empty directories; only issues with attachments have directories. Now, if there is an issue for which its attachments are deleted, its empty directory is left behind.

Suggest an answer

Log in or Sign up to answer