WebDAV not using chunked upload? (Cloudflare proxy; hitting 100MB upload limit)

Nextcloud version: 22.2.3 - LinuxServer_Nextcloud docker
Operating system and version: Unraid 6.9.2

The issue you are facing:
Unable to upload more than 100MB using WebDAV connection when nextcloud is proxied through cloudflare.

Steps to replicate it:

  1. Use Cloudflare to proxy Nextcloud (security reasons)
  2. Upload file larger than 100MB
    • Nextcloud Client on Windows = success
    • Opening Website and using browser to upload = success
    • WebDAV connection with Windows PC = FAIL
    • WebDAV connection with Android app (not nextcloud) = FAIL

No errors in swag or nextcloud logs on my server when upload fails.
So, after a lot of testing I must conclude that Cloudflare limit is being hit:
Cloudflare says under Network:
Maximum Upload Size = 100MB
And that’s exactly the limit I hit when testing.
Changing Cloudflare proxy from “proxied” to “DNS only” WebDAV works.
Seems to me that WebDAV doesn’t utilize chunked upload?

How to get WebDAV to work with a cloudflare proxy? Is this possible? What setting am I missing?

I found https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/chunking.html
But using https://server/remote.php/dav/uploads/username
instead of https://server/remote.php/dav/files/username
results in a 403 Forbidden error?


I’m experiencing the same issue… glad you’ve reported this. Experiencing the exact same thing you’ve outlined here with a similar setup.

Well, some more info.

Contacted the developer of the Android app; he gave me the option to force chunking. Set that to 50MB and everything works just fine now. Uploading large files over WebDAV is not an issue anymore.

Weird thing is; I had already set chunksize server side to 50MB, but that doesn’t make any difference apparently? The user has to force chunking? That seems strange, no?

In Windows you don’t have that option? So in Windows the upload still fails with 100MB.

So question remains:

  • How to (really) force chunking server side?
  • Or how to do you set chunk size when using webdav as a user (on Windows)?

I am also running into this issue. I don’t remember running into this problem for more than a month or two. Is this a result of the changes with the Nextcloud sync for ver 23?

Read perhaps this docs. Not tested.

sudo -u www-data php occ config:app:set files max_chunk_size --value 20971520

Put in a value in bytes (in this example, 20MB). Set --value 0 for no chunking at all.
Default is 10485760 (10 MiB).

Yes, I already tried that, but that does not affect webdav connections at all. Upload is still cutoff at 100MB. It seems like you need to force chunking client side. After the dev of the android app implemented that and gave users the option to force chunking upload went fine.

So server settings does not seem to matter for webdav? Very strange…

1 Like

@LedNext could you please add a comment to https://github.com/nextcloud/desktop/issues/4278 ? That way we can get more attention to this.

1 Like

This issue still persists. I take it no fix yet?