How to increase the size of the attached file in Drupal

I am attaching a file to node in drupal using File Attachment. But this does not allow me to upload a file larger than 1 MB. I want to upload a 50 MB file. How to increase this size. Thanks in advance.

+3
source share
3 answers

Add below to the appropriate php.ini file (recommended if you have access). Note that for some hosts this is a system-wide parameter. However, for hosts running PHP as a CGI script using suexec (for example), you can place these directives in the php.ini file in the Drupal root directory.

  • upload_max_filesize = 50M
  • post_max_size = 50M

Add the following .htaccess file to the Drupal root directory.

  • php_value upload_max_filesize 50M
  • php_value post_max_size 50M
+6
source

, PHP, , Drupal, . , PHP, , Drupal, .

0

"Administration" Site configuration "Upload files" (/ admin / settings / uploads). You can set a Drupal limit for each role. Drupal settings may not be larger than allowed by PHP, but may be smaller if you have not updated them, so be sure to also check after updating php.ini.

0
source

Source: https://habr.com/ru/post/1723675/


All Articles