Trying to set hide download with api

Support intro

i am trying to figure out if there is an API way to Enable the hide download which can be chosen easily from the web-UI. so that the end result is that user can read and edit the file but not download.

Nextcloud version : docker install - Nextcloud Hub 6 (27.1.3)
Operating system and version : Ubuntu 22.04

The issue iam are facing:

  • i have tried these api end points

    • create a new share i have tried this command, but got the hide_download = 0

      curl -u '<user>:<password>' \
      -H 'OCS-APIRequest: true' \
      -X 'POST' '' \
      -d path="/AIM166-AIM-B1-ZZ-MM-AI-W0-P02.txt" \
      -d shareType=3 \
      -d permissions=19 \
      -d attributes='[{"scope": "permissions", "key": "download", "enabled": "false"}]'
  • update a share also i have tried to update the share with a single attribute, but also got the hide_download = 0

    curl -u '<user>:<password>' \
    -H 'OCS-APIRequest: true' \
    -X 'PUT' '' \
    -d attributes='[{"scope":"permissions","key":"download","enabled":false}]'

can any one provide useful info pointing me in the right direction where i could solve this issue or is this hide download not implemented yet in API calls ???

thank you anyway …

I think “hide download” only hide the download button. That has no effect to the API and not really to Nextcloud Web GUI. If you use “hide download” in Nextcloud GUI the user can still add /download to the sharing url. Every showing of a file is a “download”. Hide download makes no sense and if so, then only for stupid users.

thank you devnull for your answer, anyway with hide download as the name suggests then at least the download is not visible and if the user is more educated then he will be able to download, which is something that i do not want but at lest this is what i got so i have to use it.