-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat(nextcloud): Implement chunked upload #2308
base: main
Are you sure you want to change the base?
Conversation
This might not answer your questions about how to handle the clients, but the http package already provides a |
That's the old unchunked upload which doesn't help at all here. I followed https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/chunking.html to implement it which is completely custom. |
What methods will the caldav and carddav client need? |
They would also use all the other methods because they just operate on the same "filesystem" structures. Using streams and files is probably not useful there as the data is usually small and not stored in files, so those would be WebDAV specific. |
I can make a quick diagram later to explain what I have in mind for the structure. |
Sure, that would help a lot. |
Yeah same here |
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
5002b96
to
8e503af
Compare
I feel like working on this without looking more into #718 makes no sense because I don't know what will be necessary for it. If I knew that it would be easy to chose the right way to abstract this. |
#1123
This PR isn't finished because I want to discuss the direction first.
For now I made the WebDavClient re-usable for WebDAV extensions by allowing to configure the endpoint. This will also be necessary for #718.
I'm not sure if this is the right way or if the methods should be re-implemented. Maybe the best way is to have an abstract DavClient and then let the WebDavClient extend it and supply the endpoint and additional helper methods if necessary.
There is also the problem with the username because currently we use the
remote.php/webdav
endpoint which doesn't require it, but any other endpoint likeremote.php/dav/files/{username}
orremote.php/dav/uploads/{username}
need it. Unfortunately the root client only knows the login name which is not necessarily the username so it needs to be passed manually with the endpoint.For the chunked upload part I want to add some helper methods for uploading a stream or file that is automatically divided in chunks so it is easily usable.