keelapps

keelapps/Guides

How to download all attachments from Jira Cloud

Jira Cloud · Updated

Jira Cloud can zip every attachment on one issue. It cannot zip the attachments behind a JQL search or a whole project, which is what an audit request, a contract handover or a storage clean-up usually needs. This guide covers four ways to do it, a script you can run today, the traps that lose files, and how to find out what is filling your storage.

We make Satchel, one of the options below, so we are not neutral. The native routes and the script come first and need no app.

What Jira does and does not do

On a single issue, the attachments panel has Download all, which returns one zip. That is the whole of Jira’s bulk download. There is no action on a search result, a filter, a board or a project that collects files across issues. The request for one, JRACLOUD-68871, has been open since 2018.

Two related limits come up at the same time. Past 150 attachments on one issue, Jira stops showing previews and thumbnails (JRACLOUD-81747). And Jira has no recycle bin for attachments (JRACLOUD-81027), so a bulk delete without a copy is final.

Option 1: one issue at a time

Open each issue, choose Download all in the attachments panel, and rename the zip after the issue key. For ten issues this is fine. For a quarter’s worth of invoices or a project’s design files it is an afternoon of clicking, and the result is a pile of zips that someone has to unpack and sort.

Option 2: a site backup

Settings → System → Backup manager can create a backup that includes attachments. It is complete, and it needs no code. It is also the whole site: you cannot narrow it to a project or a search, the files arrive in an internal folder layout rather than by issue key, and Jira limits how often you can create one. Use it for migration and disaster recovery, not for handing a project’s files to an auditor.

Option 3: a REST API script

The REST API returns each issue’s attachments with a download URL, so a short script can turn any JQL search into a folder per issue. This one uses Python with the requests library and an API token:

import os, pathlib, requests

site = "https://your-site.atlassian.net"
auth = (os.environ["JIRA_EMAIL"], os.environ["JIRA_TOKEN"])
jql = "project = FIN AND created >= -90d"

token = None
while True:
    params = {"jql": jql, "fields": "attachment", "maxResults": 100}
    if token:
        params["nextPageToken"] = token
    url = f"{site}/rest/api/3/search/jql"
    page = requests.get(url, params=params, auth=auth).json()
    for issue in page["issues"]:
        folder = pathlib.Path("export") / issue["key"]
        for a in issue["fields"].get("attachment", []):
            folder.mkdir(parents=True, exist_ok=True)
            name = a["filename"].replace("/", "_")
            path, n = folder / name, 1
            while path.exists():          # two files can share a name
                path, n = folder / f"{n}-{name}", n + 1
            file = requests.get(a["content"], auth=auth)
            path.write_bytes(file.content)
    token = page.get("nextPageToken")
    if not token:
        break

Four traps catch most first versions:

  1. Same-name files overwrite each other. Three files called screenshot.png on one issue become one unless the script renames them, as the loop above does.
  2. Rate limits. A large export will be told to slow down with HTTP 429. Respect the Retry-After header and retry rather than skipping the file.
  3. Silent gaps. A file that fails to download should be written to a list, so the person receiving the folder knows it is incomplete.
  4. What the token can see. The script runs as the token’s owner. Issues hidden from them by issue security are missing from the result without any error.

Option 4: an app

Several Marketplace apps add bulk download inside Jira. They differ most in where your files travel and what else they do. Before installing one, check:

The options side by side

QuestionDownload allSite backupREST API scriptSatchel
From a JQL search or a project?One issue onlyWhole site onlyYesYes
Foldered by issue key?One zip per issueNoIf the script does itYes
Same-name files kept?YesYesIf the script renamesRenamed, never overwritten
Missing files reported?——If the script logs themA note inside the zip
Do the files leave Atlassian?To your diskTo your diskTo wherever it runsTo your disk, via your browser
Storage report by uploader, type, age?——If you build itYes
CostFreeFreeYour timeFree up to 10 users, then per user

A one-off export is a job for the script. If people ask for files every month, or the same work has to feed a storage clean-up, an app saves the upkeep.

Finding what uses your storage

Bulk download and storage usually arrive together: someone notices the site is near its limit, and the files have to be saved somewhere before they can go. Jira Cloud reports storage for the whole site, not per project, so the first step is an inventory.

  1. List every attachment in the project with its size, media type, uploader, issue and date. The search in the script above returns all of these in the attachment field; write them to a CSV instead of downloading.
  2. Sort by size. A few dozen files usually account for most of the space: screen recordings, database dumps, design exports.
  3. Group by uploader and type to find the habits behind it, such as a build bot attaching logs to every issue.
  4. Look for duplicates by filename and exact size. Jira exposes no content hash, so treat matches as candidates to check, not proof.
  5. Copy before you delete. Download what you will remove, then delete. Jira Automation has a delete attachments action, but no preview and no undo.

Questions

Can Jira Cloud download attachments from several issues at once?

Not from the issue view. Download all works on one issue. Across issues you need a site backup with attachments, a REST API script, or a Marketplace app. The request for a native option, JRACLOUD-68871, has been open since 2018.

How do I download all attachments from a Jira project?

Run a JQL search such as project = KEY with the attachment field, then download each attachment’s content URL into a folder per issue key. The script above does this, and apps such as Satchel do it from the project page without a script.

Does a Jira Cloud backup include attachments?

It can. Backup manager lets you include attachments, but the backup covers the whole site, cannot be narrowed to a project or a search, and is meant for migration and disaster recovery rather than handing files to someone.

Can I restore an attachment I deleted in Jira Cloud?

No. Jira Cloud has no recycle bin for attachments, and Atlassian does not undo customer deletions from its backups. Download a copy before deleting anything in bulk.

How do I find which projects use the most Jira storage?

Jira reports storage for the whole site, not per project. To see where it goes, list every attachment with its size, type, uploader and date, from the REST API or with an app that builds that inventory, and sort.

Where Satchel fits

Satchel for Jira is option 4. From the project page it zips a JQL result or the whole project, foldered by ISSUE-KEY/, in archives of up to 1 GB and 5,000 files. Same-name files are renamed rather than overwritten, and a note inside the zip names anything it could not include. The archive is built in your browser from your own Jira session, so the files never reach a server of ours; there is not one.

The same page builds the inventory described above: storage by uploader, file type, issue type and age, the biggest files, and duplicate candidates with the space each group would free. Deletion ships switched off. Once an administrator turns it on, it needs a preview Jira has checked and a typed confirmation, and every deleted file is recorded for 400 days.

What it does not do: it never uploads, inventories are per project rather than site-wide, and duplicate detection finds candidates, not proven copies. Sites of up to 10 users pay nothing, and the single-issue zip stays free on every install.

Try Satchel free

Moving files out of Confluence instead? Satchel for Confluence does bulk download and moves attachments between pages.