owncloud / ocis

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

Unable to upload files via webdav #9605

Closed aol-nnov closed 2 weeks ago

aol-nnov commented 1 month ago

Describe the bug

Files end up being zero bytes long if uploaded via webdav. Large files (hundreds of megabytes) do not upload at all.

Downloading and deleting via webdav works fine.

Steps to reproduce

  1. On a MacOS machine bring up Finder and press cmd+k enter https://<ocis-instance>/dav/files/admin/ and press 'connect'
  2. Observe admin files list.
  3. Drag a file to the Finder window, observe uploading indication

Expected behavior

File and its contents is available inside owncloud

Actual behavior

File is zero length.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

official docker image owncloud/ocis-rolling:6.1.0 behind traefik 3

```console OCIS_URL=https:// OCIS_LOG_LEVEL=info OCIS_LOG_COLOR=false OCIS_LOG_PRETTY=false # do not use SSL between Traefik and oCIS PROXY_TLS=false # make the REVA gateway accessible to the app drivers GATEWAY_GRPC_ADDR=0.0.0.0:9142 OCIS_INSECURE=false # basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect) PROXY_ENABLE_BASIC_AUTH=true ```

Additional context

Uploading with external clients (i.e. Cyberduck) works though...

aol-nnov commented 1 month ago

Well... It appeared all in vain, sigh...

Windows deprecates its Webclient (WebDAV) Service (thus, webdav, too), MacOS client has aforementioned problems.. So, this leads us to the only solution - owncloud desktop client with "virtual files" mode, right?

Or, may be, there are any other solutions? https://github.com/dokan-dev/dokany may be?

Oh, any way.. All of them require installing something on the client host.. It's all in vain. Sorry for the noise.

butonic commented 2 weeks ago

Windows and MacOS both have introduced APIs to deal with 'Cloud Storage'. The desktop team is using them, just like the dropbox or OneDrive client apps are. These apis are nice because they allow showing the user the sync state of files.

We tried being extra nice to the old windows and mac WebDAV clients long enough. But some things just don't work well with WebDAV. Easiest example is large files. The connection might break and the native clients do not resume the upload. They don't even chunk large uploads. All of that is handled in our WebDAV implementations, and some others out there.

I'll close this as the ownCloud desktop and mobile clients work as designed and AFAICT our WebDAV server implementation is also working properly.

Also letting you know that personally I'd prefer to move all clients to the graph API, as it has a solid and well specified way how to do paginated directory listings. Something that is sorely lacking in WebDAV. I am fully aware of the pagination hack using the Range header proposed by MS. The web UI needs paginated requests sorted by name, mtime or size ... I don't see that coming to WebDAV. The ms graph / libre graph API has all that and it is arguably easier to work with being JSON instead of XML.

anyway ... I recommend you use our clients.

aol-nnov commented 2 weeks ago

Thank you for detailed explanation, @butonic