Closed Universal-Omega closed 1 year ago
I can move the list of zones into a configuration variable.
Currently it is hardcoded in
https://github.com/edwardspec/mediawiki-aws-s3/blob/b4ab6bee32be8cd934926938b3b4cddfb4f55f2f/includes/AmazonS3Hooks.php#L74-L76
and in getS3RootDirInternal()
,
and also "-local-" is always added into container name in
https://github.com/edwardspec/mediawiki-aws-s3/blob/b4ab6bee32be8cd934926938b3b4cddfb4f55f2f/includes/AmazonS3Hooks.php#L107
For now, if you want to avoid using $wgExtensionFunctions
, you can
instead use the old-style configuration (without $wgAWSBucketName
,
see tests/travis/OldStyleAWSSettings.php
for an example), which
allows to define $wgFileBackends['s3']
manually.
2023-05-30 22:17 GMT+03:00, CosmicAlpha @.***>:
I currently have to use the following in
$wgExtensionFunctions
, which is obviously not ideal:global $wgFileBackends, $wgDBname, $wgAWSBucketName; $wgFileBackends['s3']['containerPaths']["$wgDBname-avatars"] = "$wgAWSBucketName/$wgDBname/avatars"; $wgFileBackends['s3']['containerPaths']["$wgDBname-awards"] = "$wgAWSBucketName/$wgDBname/awards"; $wgFileBackends['s3']['containerPaths']["$wgDBname-dumps-backup"] = "$wgAWSBucketName/$wgDBname/dumps"; $wgFileBackends['s3']['containerPaths']["$wgDBname-local-transcoded"] = "$wgAWSBucketName/$wgDBname/transcoded"; $wgFileBackends['s3']['containerPaths']["$wgDBname-score-render"] = "$wgAWSBucketName/$wgDBname/score"; $wgFileBackends['s3']['containerPaths']["$wgDBname-timeline-render"] = "$wgAWSBucketName/$wgDBname/timeline";
If there is a way to do it, I apologize, if not if would if support could be added. Thanks!
-- Reply to this email directly or view it on GitHub: https://github.com/edwardspec/mediawiki-aws-s3/issues/61 You are receiving this because you are subscribed to this thread.
Message ID: @.***>
Would the following syntax be convenient and/or sufficient for the customization you need? (already implemented, not yet merged into master)
$wgAWSRepoZones['timeline'] = [
'container' => 'timeline-render',
'path' => '/timeline'
];
$wgAWSRepoZones['transcoded'] = [
'container' => 'local-transcoded',
'path' => '/transcoded',
'isPublic' => true
];
I currently have to use the following in
$wgExtensionFunctions
, which is obviously not ideal:If there is a way to do it, I apologize, if not if would if support could be added. Thanks!