File drop via API


Nextcloud version 12.0.0
Operating system and version Ubuntu 16.04
Apache 2
PHP version 7
Is this the first time you’ve seen this error?: no

Can you reliably replicate it? (If so, please outline steps):

I want to create a file drop using the API.

I can create a file upload, but I cannot make it upload-only using the API. Setting ‘permissions=4’ seems to have no effect for a ‘publicUpload’

curl -u $USER --header “OCS-APIRequest: true” --data shareType=3 --data publicUpload=true --data permissions=4 $DOMAIN/nextcloud/ocs/v1.php/apps/files_sharing/api/v1/shares/$DIRNAME

I can get a public file drop link using the GUI like this:

Once I have selected “File drop (upload only)” I can use the API above successfully.

But I want to programmatically create and share file-drop folders.

2 Likes

This is a rather old post, but I’ve just stumbled over the same issue: I want create a file drop public link via the OCS Share API (OCS Share API — Nextcloud latest Developer Manual latest documentation). Setting permissions to 4 in the body seems to have no effect still.

Is it still not possible to create file drop shares via the API, or are we missing something?

Thanks!
Christian