Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

Uploading larger files than permitted in php.ini fails

$
0
0

Uploading files larger than permitted sizes in php.ini fails.

A recent patch to support upload of binary files via REST was committed. Wim Leers at DrupalCon Nashville mentioned to me that this patch will allow upload of larger files even through the UI. To test this

I created a site with Drupal8.6.x-dev or Drupal8.5.1 patched with issue-1927648

Replication
1) Set php.ini settings to following
; Maximum size of POST data that PHP will accept.
post_max_size = 2M

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 2

2) Restart apache to use these new php settings

3) Add a file field to Articles content type as follows
Structure > Content Types > Article > Manage Fields > Add file with following settings
Allowed file extensions: txt, pdf, ppt, pptx
Maximum upload size: Tried leaving this blank, 0 and 50 MB (which is above 2MB php limit)

4) Create a test article as follows
Structure > Add Content > Article > Upload a file with larger size than those permitted in php.ini
The file upload fails with following error

An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (2 MB) that this server supports.

1) Is the above patch supposed to work with NON REST upload
2) Is the above patch also take care of max_file_uploads settings in PHP
3) The issue issues-1927648 does not document these items and it should be noted in release notes as well as the issue itself.

Please advise


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>