[SOLVED] "unknown error" when uploading in web app / "413 Request Entity Too Large" when uploading through webdav

Dear community,
just wanted to share this finding including solution :wink:
Since a while I had the problem when uploading abitrary files through the files (web) app I got the error fly-in: “unknown error”. Obviously, noone knows what the error is :rofl:
Recently I tried the same with a webdav client (winscp) which finally gave me a more pleasant error message: " 413 Request Entity Too Large"
With I went on googling finding: https://www.keycdn.com/support/413-request-entity-too-large
I am using nginx and the webiste suggests adding “client_max_body_size 100M” to your nginx-conf.
I searched for this entry in my nginx configs and saw that this entry was commented out ("#") in my nextcloud nginx-conf :thinking:
Setting it as follows did solve it for me:

location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+).php(?:$|\/) {
fastcgi_split_path_info ^(.+?.php)(\/.*|)$;
try_files $fastcgi_script_name =404;
include fastcgi_params;
include php_optimization.conf;
fastcgi_pass php-handler;
fastcgi_param HTTPS on;
client_max_body_size 10240M;

I hopy this helps all people with the same issue!



I’ve got the same error but with apache server instead of NGINX. Any solution for this one?