kd2org / karadav

Lightweight NextCloud compatible WebDAV server
https://fossil.kd2.org/karadav/
GNU Affero General Public License v3.0
155 stars 14 forks source link

Server replied "413 Request Entity Too Large" to PUT with Nextcloud apps on upload #50

Closed poVoq closed 8 months ago

poVoq commented 8 months ago

With this PR I got the Nextcloud apps to connect correctly to my KaraDAV behind Nginx, but somehow the apps fail to upload anything with a "413 Request Entity Too Large" error.

This might or might not be related to this similar error with Nextcloud itself. But it happens on any file regardless of the size.

Uploading files with normal WebDAV apps or the built in web-client works.

Any idea what I could try to troubleshoot this? Thanks!

bohwaz commented 8 months ago

I'm quite certain this comes from your webserver (nginx), and not from KaraDAV, as there is nowhere in the code where 413 code is raised.

You can see here for some ideas on how to fix this: https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/

poVoq commented 8 months ago

Turns out it is an issue with the Nextcloud Android app and only over wifi. With mobile data it works and the desktop app is also working. Probably some odd setting or a bug.

Thanks anyways.

bohwaz commented 8 months ago

It might be trying to upload large files without using the "chunk" feature of the NextCloud API which splits large files in smaller chunks, leaving the server to reassemble the chunks.

This is definitely not an issue from KaraDAV though :) Good luck!