For download with wget/curl you can read this
But perhaps Nextcloud is not the correct software for you. You can solve your problems perhaps better with a simple webspace directory function in e.g. Apache2 with Htaccess. Also there are some file management software systems like TinyFileManager. With this tool you can use the path directly.
You can combine Nextcloud and other webserver paths e.g. with external storage (function local).