When I upload a file which is bigger then the max_upload in php.ini, the file upload field is replaced with a error message.

After this the upload field is gone and the form can't be submitted anymore.

I've looked into the code and narrowed it down to the following file: modules/file/file.module (line 245)
There's a ajax_command_replace function which replaces the input.

Comments

Blaater created an issue. See original summary.

quicksketch’s picture

Status: Active » Closed (won't fix)

Unfortunately this problem is basically insurmountable in Drupal. The only solution I can recommend is increasing the max file upload in PHP while keeping the limit in place within Drupal and Webform so that a proper error message can be returned.

If the max_file_upload size is exceeded, Drupal itself is never called. PHP bails out before it even calls Drupal. So it's not possible for Drupal to handle it more gracefully server-side. It may be possible to handle it better in the JavaScript, but that's an issue with core that affects Webform.