You need to get a file from one machine to another and there is no share set up. If Python is installed, you already have a small web server.
cd ~/Downloads
python3 -m http.server 8000
It serves the current folder on port 8000. Open http://<ip-of-this-machine>:8000 from a phone or another computer on the same network and you get a file list you can click through and download from. Press Ctrl+C to stop. Every request is printed in the terminal, so you see who fetched what.
python3 -m http.server 9000uses another port.--bind 127.0.0.1listens on your own machine only, good for testing a static website locally.--directory /path/to/folderserves a folder without changing into it first.
Quick file transfers inside the house, previewing a folder of HTML files, or testing something that needs to be fetched over HTTP because the browser blocks file:// pages from loading other files. It also works on a server over SSH, combined with an SSH tunnel (ssh -L 8000:localhost:8000 nas), so you can download without opening any port to the network.
From another machine you can also fetch a file without a browser: curl -O http://192.168.1.50:8000/file.zip or wget http://192.168.1.50:8000/file.zip. If it does not connect, check the firewall on the serving machine and that both devices are on the same network, not on a guest network or on a different VLAN. On macOS the first run may ask whether Python may accept incoming connections; say yes for this session.
It has no password, no encryption and no access control, and by default it listens on all network interfaces. Anyone who can reach the port can read everything in that folder. Use it on a trusted network, for a short time, and never in a folder that contains private files. It is also a development server: it is slow with many visitors, so for anything permanent use nginx or a real file share.
Further reading: Python docs: http.server, On this site: python3 -m json.tool makes ugly JSON readable in one pipe