No filesize warning in panel

A client’s installation of the panel isn’t showing any warning when they try to upload a file that’s larger than what is allowed in the blueprint:

title: Template TItle
files: true
  size: 819200
      type: text
      label: Caption / Alt Text

memory_limit, upload_max_filesize,post_max_filesize, max_input_time all have generous values.

Files smaller than 800k upload as expected.

In my local environment, I get the error:

While in production, the spinner appears for a moment, then nothing happens. This shows up in kirby_error_log.log:

2017/12/10 03:18:19 [error] 23386#23386: *56 client intended to send too large body: 3445747 bytes, client:, server: myserv., request: "POST /panel/pages/projects/project1/upload?csrf=3scJ3zMlUWLqTbvWPB8bdhD6fxpdgQRb HTTP/1.1", host: "", referrer: ""

Toolkit version: 2.5.7
Kirby version: 2.5.7
Panel version: 2.5.7

Development (working):
OS X High Sierra
PHP 7.1.12

Production (not working):
Linux Ubuntu 16.04
PHP 7.0.22

Anything I can do to get my client to see these errors?

What happens if you take the limit off the field? The bytes reported in the error is no where near 800k.

Is your live server running nginx? If so, you need to set client_max_body_size explained here.

This looks like the file is rejected due to too large size by the server before the Panel error messages can even kick in. So what @jimbobrjames suggested will probably help.

Still trying to find out why there is no error message at all if upload fails.

@jimbobrjames, client_max_body_size did the trick, thank you!

1 Like