Feature #61352
openDeveloper context configuration for FAL drivers
0%
Description
There will be a need for developer context dependent configuration of a FAL driver if it is NOT local. With the local FAL driver it's a simple to sync all stages with the resources.
If you have a live stage connected to a cloud service, the file references will be individually for this environment. If you have another stage like develop or staging, you need another similar cloud connection. Cause if you make changes on one of the other stages the file references will collide whith the one on the live stage.
Therefore a feature is needed to override the FlexForm cofiguration to set e.g. other account settings. I think this can be done by page TSconfig.
Perhaps there is another way to handle more then one stage I did'n know…?
Updated by Arno Dudek over 9 years ago
This can be a simple and light solution to override the configuration dynamicly.
// The key "[1]" is the uid of the storage record. $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['overrideStorageConfiguration'][1] = array( 'basePath' => '/', 'pathType' => 'relative' );
And then in the file typo3/sysext/core/Classes/Resource/ResourceFactory.php
at the function getStorageObject
before creating the object at if (!$storageObject instanceof ResourceStorage)
if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['overrideStorageConfiguration'][$uid])) { \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($storageConfiguration, $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['overrideStorageConfiguration'][$uid]); }
This is not tested, but should work.
Updated by Mathias Schreiber about 6 years ago
- Status changed from New to Accepted