Best way to download multiple files from HA?

Hi!
Recently I started downloading files from an API to my HA server. Unfortunately, Samba Share isn’t keeping the file names intact.
I also tested the File editor, which keeps returning ‘502: Bad Gateway’, when trying to download folders.

Any advice?