owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.36k stars 179 forks source link

Return id of created folder in mkcol request #9618

Open JammingBen opened 2 months ago

JammingBen commented 2 months ago

It would be great if webdav mkcol requests could return the id of the newly created folder. A webdav PUT request e.g. returns the file id as a header Oc-Fileid. Can we have the same or similar for mkcols?

This is needed for the web client to immediately fetch a newly created folder when working with id-based requests.

butonic commented 2 months ago

urgh webdav is so sync ... why can't we have nice things like an event stream that clients can listen to to get notified when a file or folder is created... then they could issue a request and show a placleholder until the eventream says "yo! request xyz asked to create a folder. I created it with id yadayada and etag blarg"

at least let us clients tell the server to allow doing this kind of async requests.

oh wait odata already specified how to do that using websockets and Prefer=respond-async.

JammingBen commented 1 month ago

Sounds like a good idea, but needs quite some work, especially on the client side. Also, it would be great if the server was capable of dealing with creating a folder tree structure for an upload. Because currently, the client sends a dozen of mkcol requests before it starts uploading files. Having that async will be painful (I think) because we would need to make sure that the full directory tree has been created before actually stating the upload.

Anyway, can we still get https://github.com/cs3org/reva/pull/4767 merged for now?

kobergj commented 1 month ago

why can't we have nice things like an event stream that clients can listen to to get notified when a file or folder is created

We have that. We call it sse.

micbar commented 1 month ago

What is the issue in just returning the id? Always keep it as simple as possible.