Sharelink after upload and password in sharelink

I use some simple bash scripts to upload files via sftp to my nextcloud with database refresh over occ. Also i use sharingpath to get fixed links in case i need to renew or rebuild something so the sharelink stays the same as long as the folder structure and domain stays the same too.
Now I would like to set the sharing flag from within the script so I dont have to manually click the + sign everytime i upload something per script.
Is there a way to achieve this?

Also would it be possible to password protect a file and to implement this password into the sharelink for unattenend download? Lets say the link has to be used by an app that has to access this file but without password prompt.
My goal is to restrict access to a link by renewing the password so only the last who gets the link can access it

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).

Thx @devnull
The unattanend password download thing isnt a big dealbreaker for me. I like nextcloud really a lot and want to keep it as my webstorage.
But the automatic sharing flag after adding a file… That would save me some time :slight_smile:

Perhaps you can write an issue.