feat: 新增webdav存储
This commit is contained in:
+3
-2
@@ -1,8 +1,9 @@
|
||||
import datetime
|
||||
import uuid
|
||||
import os
|
||||
import uuid
|
||||
|
||||
from fastapi import UploadFile, HTTPException
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from apps.base.dependencies import IPRateLimit
|
||||
from apps.base.models import FileCodes
|
||||
|
||||
+5
-1
@@ -135,4 +135,8 @@ async def download_file(key: str, code: str, ip: str = Depends(ip_limit['error']
|
||||
if not has:
|
||||
return APIResponse(code=404, detail='文件不存在')
|
||||
|
||||
return APIResponse(detail=file_code.text) if file_code.text else await file_storage.get_file_response(file_code)
|
||||
return (
|
||||
APIResponse(detail=file_code.text)
|
||||
if file_code.text
|
||||
else await file_storage.get_file_response(file_code)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user