Project

General

Profile

Actions

Feature #61352

open

Developer context configuration for FAL drivers

Added by Arno Dudek over 9 years ago. Updated about 6 years ago.

Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-09-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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…?

Actions #1

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.

Actions #2

Updated by Mathias Schreiber about 6 years ago

  • Status changed from New to Accepted
Actions

Also available in: Atom PDF