feat: 新增存储路径自定义,修复s3存储未删除文件#246

This commit is contained in:
Lan
2025-02-08 22:41:32 +08:00
parent d0427276d3
commit 1c7e010dbb
21 changed files with 52 additions and 43 deletions
+1
View File
@@ -12,6 +12,7 @@ if not data_root.exists():
DEFAULT_CONFIG = {
'file_storage': 'local',
'storage_path': '',
'name': '文件快递柜 - FileCodeBox',
'description': '开箱即用的文件快传系统',
'notify_title': '系统通知',
+1
View File
@@ -16,6 +16,7 @@ from core.utils import get_now
async def delete_expire_files():
file_storage: FileStorageInterface = storages[settings.file_storage]()
print(settings.file_storage)
while True:
try:
# 遍历 share目录下的所有文件夹,删除空的文件夹,并判断父目录是否为空,如果为空也删除