This is rather crude, but I'm using it to back up all of my Nostr media uploads for now (until Kosmos storage has NIP-96 or Blossom support):
https://storage.kosmos.org/raucao/public/shares/241102-2154-download-images.txt
Can be used like this for example:
`./download-images.sh ws://localhost:7777 $pubkey_hex ~/backup/nostr/images/`
(It will create a subdirectory per pubkey in backup dir. Needs nak and jq installed.)