Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return id of created folder in mkcol request #9618

Open
JammingBen opened this issue Jul 16, 2024 · 5 comments
Open

Return id of created folder in mkcol request #9618

JammingBen opened this issue Jul 16, 2024 · 5 comments
Labels
Category:Enhancement Add new functionality

Comments

@JammingBen
Copy link
Contributor

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
Copy link
Member

butonic commented Jul 19, 2024

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
Copy link
Contributor Author

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 cs3org/reva#4767 merged for now?

@kobergj
Copy link
Collaborator

kobergj commented Jul 22, 2024

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
Copy link
Contributor

micbar commented Jul 22, 2024

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

@butonic
Copy link
Member

butonic commented Oct 2, 2024

It forces the folder creation to be atomic. I'm trying to to get more requests into a CQRS pattern, but that won't happen on webdav. So, we need to update the CS3 API and add mtime and etag properties to the CreateContainer response ... maybe also size, because on posix fs folders have size 4k and not 0. And also for Move, Delete and TouchFile

@micbar micbar moved this from In progress to Prio 3 or less in Infinite Scale Team Board Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality
Projects
Status: Prio 3 or less
Development

No branches or pull requests

4 participants