.. include:: /Includes.rst.txt .. _feature-68895: ====================================================================================== Feature: #68895 - Introduced hook in BackendUserAuthentication::getDefaultUploadFolder ====================================================================================== See :issue:`68895` Description =========== It is now possible to change the upload folder returned by `BackendUserAuthentication::getDefaultUploadFolder()` by registering a hook. This makes it possible to set a different upload folder for fields with direct upload enabled in the backend. Register own getDefaultUploadFolder hook ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To use your own hook to manipulate the upload folder you need to register the function in `ext_localconf.php` of your extension. .. code-block:: php $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getDefaultUploadFolder'][] = \Vendor\MyExtension\Hooks\DefaultUploadFolder::class . '->getDefaultUploadFolder'; Example getDefaultUploadFolder hook ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: php hasFolder($folderName)) { $uploadFolder = $uploadFolder->getSubfolder($folderName); } } return $uploadFolder; } } .. index:: PHP-API, Backend