Fixed Web server filesize limit causes "undefined" error

Kent

Active member
The uploader detects PHP's upload limit, but not the web server's limit.

If the web server's file upload size limit is lower than XenForo's, it causes the uploader to just return an error "undefined."
xenforo_resource_manager_uploader_filesize_error.webp

JS console produces this after a few upload progress updates:
Code:
Uploaded 8060928/11290580 bytes.
Upload failed: [Object { creationdate=Date,  size=11290580,  type=".zip",  more...}, -220, "Error #2038"]
All files uploaded.

Reproduce: try to upload a larger file than allowed by the web server.

With Nginx:
Code:
client_max_body_size 1m;

Nginx responds with HTTP 413 (Request Entity Too Large)
 
I did the same with a post attachment and got the error "There was a problem uploading your file."
Although that's better than "undefined" perhaps it should check the returned HTTP code to determine that the upload failed because the webserver rejected the request because it was too large.
 
Yep just saw this was RM related but from what I can see it gives an error message now but the actual issue is not fixed, or do uploads work correctly now?
 
Back
Top Bottom