Jira Cloud Attachment Size limit not enforced

Bill_Stephens December 3, 2021

We've been alerted that our Jira Cloud account is nearly out of free space. In my efforts to cleanup our instance, I've noticed that some teams have attached massive videos to some tasks. These videos appear to exceed the attachment size limit set in the Jira administration.  

Question: Is the attachment limit no longer enforced? 

 

Configuration
Jira Cloud  attachment size limit set to 10MB. 
Screen Shot 2021-12-03 at 8.40.30 AM.png

Test Data

I generated a 12MB file on my Mac 

  • Create file: "mkfile 12m 12mfile.pdf"
  • File details:  12582912 Dec  3 08:29 12mfile.pdf

Test

  1. Create a test Jira task
  2. Attempt to attach the 12MB attchment
  3. Expect:  Jira warns user that file is too large to attach
  4. Actual: Jira accepts the file and attaches to task with no warning. 

 

2 answers

0 votes
Bill_Stephens December 3, 2021

OK.  It appears that Jira is blocking the uploads, but the error doesn't mention file size as a problem. 

Screen Shot 2021-12-03 at 3.22.43 PM.png

After page refresh, the issue is gone. I assume that the file was also removed from the filesystem, too. 

0 votes
Joseph Hani
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 3, 2021

Up for this subject. 

We have the same problem with same scenario case. 

We still have some plenty free space but it's going fast lol 

Bill_Stephens December 3, 2021

Our problem is video attachments. Ideally, videos should be stored where they can be accessed with a URL (Google Drive) and linked to issues. 

I'm handling the cleanup with a Python script against the REST API.   

  1. Query tasks created before X and that have attachments
    1. GET  https://<instance>.atlassian.net/search?jql=<url-encoded-query>
      Project = <PROJECT_KEY> AND attachments is not EMPTY and created < "2017/01/01"
  2. For each matched key
    1. Get issue JSON
      1. GET https://<instance>.atlassian.net/rest/api/3/issue/<key>
    2. Extract the fields->attachment array
    3. For each attachment
      1. if mimeType in (video/mp4, video/avi, video/x-ms-wmv)
        1. Delete the attachment
          1. DELETE https://<instance>.atlassian.net/rest/api/3/attachment/<attachment-id>

It's in testing. I might have to add a sleep to avoid hitting API rate limits. 

Like Joseph Hani likes this
Joseph Hani
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 6, 2021

Hey Bill !! 
Thank you for your help! I really like your code! It could be useful for us :) 

I don't know the size of your instance but we are also trying to manage all the attachments in our project. 

If you like, I have opened a question in the community but the code could also help you. 

The script work in REST API also, it exports all the information about the ticket with attachment. Mainly, we are interested in the size and creation date of the ticket. And if we see tickets with a big size we bulk delete those tickets with Automation.

https://community.atlassian.com/t5/Jira-Software-questions/Help-on-export-script-in-python-bat-using-requests/qaq-p/1878122

 

Also, if you have any idea of how i could improve the script that would be super great ! 

 

Have a nice day @Bill_Stephens 

Regards,

JH

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events