5

Is there a way to select multiple attachments on a Trello card and download them all together? (Rather than one at a time.)

7 Answers 7

2

Unfortunately it's not possible to download multiple attachments at once. You can only download Trello Card attachments one at a time. If you're just trying to get all the data, you can try exporting your Trello Board data.

2

In case you have Python available, I used the following script for myself:

import json
import requests

with open('trello.json') as f:
    data = json.load(f)

for action in data['actions']:
    if not 'attachment' in action['data']:
        continue
    if not 'url' in action['data']['attachment']:
        print action['data']['attachment']
        continue
    url = action['data']['attachment']['url']
    name = action['data']['attachment']['name']
    print name
    r = requests.get(url)
    with open(name, 'wb') as f:
        for chunk in r:
            f.write(chunk)
1
  • Note (for python agnostics like myself): run this with python v2, v3 does not seem to work.
    – panepeter
    Nov 18, 2019 at 10:56
1

You can't do that in Trello no, but if you get a browser plugin such has this for Chrome

Image Downloader

You can then just open the card and hit the plugins button, then select all of the images you wish to download. Much faster than doing it individually.

1
  • Good extension! +1 Jan 5, 2015 at 15:45
1

Here's a way to download all the attachments for one Trello card using JavaScript.

Open the card in Trello and then run the following in your browser inspector console:

// Clicks the "View all attachments" if there are more than four attachments
[...document.getElementsByClassName("js-view-all-attachments")][0].click();

// Parses for all the attachment direct download links 
var a = [...document.getElementsByClassName("js-attachment-list")][0];
var links = [...a.children].map((el) => el.firstElementChild.href);

// Prints all the attachment links on separate lines
console.log(links.join("\n"));

// example output 
// https://trello-attachments..file1.png 
// https://trello-attachments..file2.pdf
// https://trello-attachments..file3.txt

From there you can use wget on command line to download all the files.

// Prints out the command to download all the links
console.log("wget " + links.join(" "));

// e.g. wget https://trello-attachments..file1.png https://trello-attachments..file2.pdf https://trello-attachments..file3.txt
-1

I've had this issue and made a quick tool to help with this, happy to share:

https://bendellar.com/trello_attachment_downloader/

It allows you to paste the JSON export from either a card or the whole board and will create a zip archive of all the files together.

1
-1

I had used your solution for a long time but today I got an error message; There was an error downloading this file. Probably it is not a real download link. Tried URL: https://trello.com/1/cards/61......

I tried from a card JSON export, which I already downloaded before from your site, no matter what I try, I got the same error. and on the website came the next error: Error with file: IMG_2147.jpg We couldn't download this file. It might not actually be a file or might have been deleted from Trello.

Could you check please if I go to the URL in the error message saying could not find, I see the image.

-1

A heavily requested feature for Trello users of Bridge24, we are excited to provide access to the File Download Manager. This allows the punctual or bulk download for files (attachments) associated to cards (documents, images, other) within a card, a search set of cards, a board, or across multiple boards. It has been optimized to track the transfer status and provides an index and log, in structured zip files. Whether just with a few attachments or a full backup of 10s of GBs of files, this feature is robust and gets the job done!

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.