Forums

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

How to find out matching attachment Id and filename?

Albert Cameron August 4, 2021

Jira stores all attachments not with the filename in the attachment but as an ID.

Now I have to find out which ID belongs to a specific filename. 

The only way to do this in my opinion is to query the database .

I do not know which table I have to query. Maybe attachment .

There I should find the matching of Id and filename.

Has anyone done this before ? 

1 answer

1 accepted

0 votes
Answer accepted
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.
August 4, 2021

You either need to read the database or code for asking the API for the id of any given attachment.

I'd question why you think you need this though - the attachment ID doesn't tell you anything you would need to know that you can't get by reading the issue the attachment is attached to (and you'll get the name of the file if you go via the issue)

Albert Cameron August 4, 2021

Thanks. It is indeed possible to get the Id of the attachment . I did not know it matches the filename.

Querying the database would have cost me some hours :)

Suggest an answer

Log in or Sign up to answer