1: <?php
2: /**
3: * This code is licensed under AGPLv3 license or Afterlogic Software License
4: * if commercial version of the product was purchased.
5: * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files.
6: */
7:
8: namespace Aurora\Modules\S3Filestorage;
9:
10: use Aurora\System\SettingsProperty;
11:
12: /**
13: * @property bool $Disabled
14: * @property string $AccessKey
15: * @property string $SecretKey
16: * @property string $Region
17: * @property string $Host
18: * @property string $BucketPrefix
19: * @property int $PresignedLinkLifetimeMinutes
20: * @property bool $RedirectToOriginalFileURLs
21: */
22:
23: class Settings extends \Aurora\System\Module\Settings
24: {
25: protected function initDefaults()
26: {
27: $this->aContainer = [
28: "Disabled" => new SettingsProperty(
29: false,
30: "bool",
31: null,
32: "Setting to true disables the module",
33: ),
34: "AccessKey" => new SettingsProperty(
35: "",
36: "string",
37: null,
38: "S3 storage access key",
39: ),
40: "SecretKey" => new SettingsProperty(
41: "",
42: "string",
43: null,
44: "S3 storage secret key",
45: ),
46: "Region" => new SettingsProperty(
47: "",
48: "string",
49: null,
50: "S3 storage region. For AWS S3, specify region value. For other S3-compatible services, for instance DigitalOcean Spaces, set to us-east-1 .",
51: ),
52: "Host" => new SettingsProperty(
53: "",
54: "string",
55: null,
56: "S3 storage hostname. For AWS S3, leave empty. For other S3-compatible services set to your endpoint value (e.g.: nyc1.digitaloceanspaces.com for Digital Ocean Spaces).",
57: ),
58: "BucketPrefix" => new SettingsProperty(
59: "",
60: "string",
61: null,
62: "Bucket prefix you wish to be used",
63: ),
64: "PresignedLinkLifetimeMinutes" => new SettingsProperty(
65: 60,
66: "int",
67: null,
68: "Lifetime of links with authentication token built into those, for use by external services such as OnlyOffice",
69: ),
70: "RedirectToOriginalFileURLs" => new SettingsProperty(
71: true,
72: "bool",
73: null,
74: "If true, files on S3 storage are obtained via redirect to their actual URLs",
75: ),
76: "UsePathStyleEndpoint" => new SettingsProperty(
77: false,
78: "bool",
79: null,
80: "If true, send requests to an S3 path style endpoint"
81: ),
82: ];
83: }
84: }
85: