-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathext_localconf.php
More file actions
56 lines (48 loc) · 2.09 KB
/
ext_localconf.php
File metadata and controls
56 lines (48 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
use StefanFroemken\Dropbox\Driver\DropboxDriver;
use StefanFroemken\Dropbox\Extractor\ImageExtractor;
use StefanFroemken\Dropbox\Form\Element\DropboxStatusElement;
use StefanFroemken\Dropbox\Form\Element\RefreshTokenElement;
use StefanFroemken\Dropbox\Resource\Processing\ImageProcessing;
use StefanFroemken\Dropbox\Upgrade\RenameExtensionKeyUpgrade;
use TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend;
use TYPO3\CMS\Core\Resource\Index\ExtractorRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers']['dropbox'] = [
'class' => DropboxDriver::class,
'shortName' => 'Dropbox',
'flexFormDS' => 'FILE:EXT:dropbox/Configuration/FlexForms/Dropbox.xml',
'label' => 'Dropbox',
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['dropbox']['backend'] = TransientMemoryBackend::class;
// Add wizard/control to access_token in XML structure
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1552228283] = [
'nodeName' => 'refreshToken',
'priority' => '70',
'class' => RefreshTokenElement::class,
];
// Show dropbox status in file storage
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1589660489] = [
'nodeName' => 'dropboxStatus',
'priority' => '70',
'class' => DropboxStatusElement::class,
];
// Image Extractor is used to get image dimension from Dropbox API
GeneralUtility::makeInstance(ExtractorRegistry::class)
->registerExtractionService(ImageExtractor::class);
// Register processor to resize images directly in dropbox and download just the thumbnail
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processors']['dropboxImagePreviewProcessor'] = [
'className' => ImageProcessing::class,
'after' => [
'SvgImageProcessor',
],
'before' => [
'LocalImageProcessor',
'OnlineMediaPreviewProcessor',
'DeferredBackendImageProcessor',
],
];
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['DropboxRenameExtensionKey'] = RenameExtensionKeyUpgrade::class;