添加S3 hostname选项

方便从S3 cdn域名下载文件。
This commit is contained in:
Tslmuun
2023-12-30 18:19:15 +08:00
parent 4a27b56c94
commit 1bca0e007b
3 changed files with 16 additions and 8 deletions
+4 -3
View File
@@ -12,12 +12,13 @@ default_value = {
'file_storage': 'local',
'name': '文件快递柜-FileCodeBox',
'description': '开箱即用的文件快传系统',
'keywords': 'FileCodeBox文件快递柜口令传送箱匿名口令分享文本文件',
'keywords': 'FileCodeBox, 文件快递柜, 口令传送箱, 匿名口令分享文本, 文件',
'max_save_seconds': 0,
's3_access_key_id': '',
's3_secret_access_key': '',
's3_bucket_name': '',
's3_endpoint_url': '',
's3_hostname': '',
's3_proxy': 0,
'aws_session_token': '',
'onedrive_domain': '',
@@ -56,6 +57,7 @@ class Settings:
if not key.startswith('opendal_') and isinstance(default_value[key], int):
value = int(value)
default_value[key] = value
# 更新self
for key, value in default_value.items():
self.__setattr__(key, value)
@@ -76,5 +78,4 @@ class Settings:
def items(self):
return self.__dict__.items()
settings = Settings()
settings = Settings()