Skip to content

Commit 8eac6ed

Browse files
committed
feat: 重写settings,放弃env存储,改到数据库
1 parent 2a3d0a9 commit 8eac6ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/base/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ async def share_file(expire_value: int = Form(default=1, gt=0), expire_style: st
5050
if file.size > settings.uploadSize:
5151
raise HTTPException(status_code=403, detail=f'文件大小超过限制,最大为{settings.uploadSize}字节')
5252
# 获取过期信息
53+
if expire_style not in settings.expireStyle:
54+
raise HTTPException(status_code=400, detail='过期时间类型错误')
5355
expired_at, expired_count, used_count, code = await get_expire_info(expire_value, expire_style)
5456
# 获取文件路径和名称
5557
path, suffix, prefix, uuid_file_name, save_path = await get_file_path_name(file)

0 commit comments

Comments
 (0)