|
|
How to upload large filesTYPO3 has a default limitation on how big the files you try to upload can be. This limitation is 2 MB on default installs and can be up to 10 MB depending on your settings and PHP configuration. You can override these default limitations and can upload very big files. We will deal here with examples for a 100 MB file. Factors that influence the size of files you can upload: Apache PHP module configurationApache's PHP module has a limit usually in /etc/httpd/conf.d/php.conf (depends on your installation). You can change there the "LimitRequestBody" to the size you wish otherwise you might get a "connection reset" error message. Modification of the PHP configurationPHP also restricts the maximum filesize. You can change this either by modifying the php.ini file, either by adding configuration directives to the .htaccess file. php.ini settings:;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 1000 ; Maximum execution time of each script, in seconds max_input_time = 1000 ; Maximum amount of time each script may spend parsing request data ; Maximum size of POST data that PHP will accept. post_max_size = 100M ; Maximum allowed size for uploaded files. upload_max_filesize = 100M Doing this from .htaccess would look like: php_value max_execution_time 1000 php_value max_input_time 1000 php_value post_max_size 100M php_value upload_max_filesize 100M Beware in this case because modifying these settings from .htaccess could be forbidden. One can forbid/allow modifications of these values in httpd.conf TYPO3 ConfigurationYou can modify TYPO3's configurations for filesize in two ways: either by Install Tool either by localconf.ph (in fact both do the same thing, the first is user friendlier) Via Install ToolIn the All Configuration section search for maxFileSize. This setting can be adjusted to whatever value you wish after you completed the previous steps. Via localconf.phpset the following configuration to enable 100 MB uploads. $TYPO3_CONF_VARS['BE']['maxFileSize'] = '100000'; Additional settings$TCA-parametersA few TYPO3 content elements have their own restrictions regarding the maximum upload size. One can change these by editing the TCA configuration for these fields You can do this in the following ways: * Through editing ext_tables.php of the extension in typo3conf/ext/. * or create a new extension and add the code to the file ext_tables.php. * or open the file extTables.php in folder typo3conf/. Make sure that this file gets included by the following line in typo3conf/localconf.php: $typo_db_extTableDef_script = 'extTables.php'; No matter how you do it from the above ways you must this code into the extTables file
t3lib_div::loadTCA('tt_content');
// This changes the upload limit for image elements
$TCA['tt_content']['columns']['image']['config']['max_size'] = 100000;
// This changes the upload limit for media elements
$TCA['tt_content']['columns']['media']['config']['max_size'] = 100000;
// This changes the upload limit for multimedia elements
$TCA['tt_content']['columns']['multimedia']['config']['max_size'] = 100000;
Do not forget to clear the cache after you perform these updates. General aspects : | TYPO3 | TYPO3 Installation | TYPO3 Configuration | TYPO Administration | TYPO3 Performance |TYPO3 Troubleshooting | TYPO3 Glossary | Development : | Typoscript | TYPO3 Extensions - TER | TYPO3 API | TYPO3 Extension Development | Extbase | Fluid? | 3rd party | Back to > CMS |
Google SearchLogin |