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’