Setting Folder to File Drop Only via API

I’m trying to automate folder sharing on Nextcloud using the API. The issue I’m facing is that when I create a public link for a folder, I’m unable to set it to “File drop only” (upload-only mode). The API consistently generates a link where users can view and download files, instead of restricting them to uploads only.

I’ve followed the documentation and tried using permissions = 4 and publicUpload = "true", but it’s not working as expected. The only related post I found was from 2017, with no answers: File Drop via API.

See this [Bug]: sharing permissions set via API are incorrect · Issue #44782 · nextcloud/server · GitHub and the other two linked issues in it.

There are a few combinations of things here, and it’s unclear whether this is a docs issue or an implementation issue (maybe a bit of both). Anyhow, there is at least one workaround in there too (using follow-on PUT).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.