GCode upload fails: Status Code 413
-
I have an issue in my Duet Web interface.
When trying to upload a gcode, i get:Failed to upload FILE.gcode bad status code 413
putting the files directly on the SD card works.
413
appears for The Upload and start, as well as upload gcode in Jobs.this apparently is a file size issue:
Uploading an empty .gcode file (like 1kb) works.
Uploading a large other file to system files also does not.
Tested on multiple browsers.And confusingly, i could upload the same gcode last week, and did not change the system.
What could be the issue here?
-
I just found out:
If i use the local IP of Duet Web, it succeeds. Using my Domain over Port forwarding to NGINX, the error occurs. So it is a network configuration issue, but not one of Duet Web.I will still update this thread with a solution.
-
I found the solution! The issue was with my NGINX configuration limiting upload file size. Here's what fixed it:
In my NGINX config for the domain, I added:
client_max_body_size 100M; location / { # existing settings... proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300; }
This increased the max upload size to 100MB and extended the timeout to 5 minutes. After restarting NGINX, the 413 error disappeared and I can now upload larger files through my domain without issues. So happy to have this resolved!
-
-
-
@Tryptamine thanks for sharing!