|
@@ -19,18 +19,6 @@ router = APIRouter(
|
|
|
tags=["files-文件管理"],
|
|
|
)
|
|
|
|
|
|
-@router.get("/{uri:path}",name="path-convertor")
|
|
|
-@sxtimeit
|
|
|
-def get_file(uri: str):
|
|
|
- print("===",uri)
|
|
|
- file = minio_client.get_file(uri)
|
|
|
- code = 200
|
|
|
- if len(file) == 0:
|
|
|
- code = 404
|
|
|
- response = StreamingResponse(io.BytesIO(file), status_code=code, media_type="application/octet-stream")
|
|
|
- # 在请求头进行配置
|
|
|
- response.headers["Content-Disposition"] = "attachment; filename="+uri
|
|
|
- return response
|
|
|
|
|
|
@router.delete("/dag")
|
|
|
@web_try()
|
|
@@ -80,4 +68,18 @@ def get_dag_content(uri: str):
|
|
|
return res
|
|
|
|
|
|
|
|
|
+# 此接口置于末尾,勿乱动,乱动者砍死
|
|
|
+@router.get("/{uri:path}",name="path-convertor")
|
|
|
+@sxtimeit
|
|
|
+def get_file(uri: str):
|
|
|
+ file = minio_client.get_file(uri)
|
|
|
+ code = 200
|
|
|
+ if len(file) == 0:
|
|
|
+ code = 404
|
|
|
+ response = StreamingResponse(io.BytesIO(file), status_code=code, media_type="application/octet-stream")
|
|
|
+ # 在请求头进行配置
|
|
|
+ response.headers["Content-Disposition"] = "attachment; filename="+uri
|
|
|
+ return response
|
|
|
+
|
|
|
+
|
|
|
|