Is there a way to select multiple attachments on a Trello card and download them all together? (Rather than one at a time.)
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.
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)
You can't do that in Trello no, but if you get a browser plugin such has this for Chrome
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.
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")].click(); // Parses for all the attachment direct download links var a = [...document.getElementsByClassName("js-attachment-list")]; 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
I've had this issue and made a quick tool to help with this, happy to share:
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.