feat: 新增存储路径自定义,修复s3存储未删除文件#246
This commit is contained in:
@@ -12,6 +12,7 @@ if not data_root.exists():
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
'file_storage': 'local',
|
||||
'storage_path': '',
|
||||
'name': '文件快递柜 - FileCodeBox',
|
||||
'description': '开箱即用的文件快传系统',
|
||||
'notify_title': '系统通知',
|
||||
|
||||
@@ -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目录下的所有文件夹,删除空的文件夹,并判断父目录是否为空,如果为空也删除
|
||||
|
||||
Reference in New Issue
Block a user