Create File-Drop (Upload Only) using WebDav

Hi there,

I was wondering if it is possible to create a “File-Drop (Upload Only)” Link via WebDav?

My scenario is the following: in my .NET application (ASP.NET) I want to redirect users to a NextCloud File Drop link. However, to avoid having all the files end up in the same folder on NV and me potentially not being able to know which files are related to which upload/customer, I would like to create a folder on y per upload/customer basis.
This would be my workflow:

  • Users starts the submission process by giving his FirstName + LastName
  • Using WebDav, under a specific folder, create a subfolder called FirstName_LastName
  • Using WebDav, create a File-Drop link to the folder FirstName_LastName
  • Open a new browser tab which point to the File-Drop page

I could not find anything in the API nor in the WebDav RFC specs so I’m not sure if this will work using WebDav??

Kind regards

I found my own answer. Posting it here in case someone stumbles upon it.

To share a folder on Nextcloud using API, you need to use the OCS Share API instead of WebDav
OCS Sharing API

One needs to create a share with permissions set to ‘Create == 4, shareType == 3’

Hello, I am trying to achieve the exact same goal: create a “webdav file-drop folder”.

So I created the share via the API as you suggested:

curl -k -X POST -d "path=/inboxes" -d "shareType=3" -d "shareWith=group_allusers" -d "permissions=4" -H "OCS-APIRequest: true" -u <user>:<password> https://<ip_address>/ocs/v2.php/apps/files_sharing/api/v1/shares

Unfortunately, the “shareType=3” argument defaults the other arguments like this:

<share_with_displayname>(Shared link)</share_with_displayname>

Which sounds logic to me because “shareType=3” means a “Share link” type. I thought you had found a way to mix “shareType=3” and “permissions=4” to achieve this goal through the API but it just gives the same result as the GUI…

Did you really manage to create a “webdav file-drop folder” ?

Thanks for any help

Which version of NextCloud did you use? I am trying to do exactly the same share type (only upload) but I can’t. I am using NextCloud 19.0.3

I am on version 20