Merge branch 'ai/fix/model' into 'ai/develop'
Fix: 모델 다운로드 path 오류 수정 See merge request s11-s-project/S11P21S002!292
This commit is contained in:
commit
b1c6282f52
@ -37,7 +37,7 @@ def create_model(project_id: int, request: ModelCreateRequest):
|
|||||||
|
|
||||||
@router.delete("/projects/{project_id}/models/{model_key}", status_code=204)
|
@router.delete("/projects/{project_id}/models/{model_key}", status_code=204)
|
||||||
def delete_model(project_id:int, model_key:str):
|
def delete_model(project_id:int, model_key:str):
|
||||||
model_path = join_path("resources", "projects", project_id, "models", model_key)
|
model_path = join_path("resources", "projects", str(project_id), "models", model_key)
|
||||||
try:
|
try:
|
||||||
delete_file(model_path)
|
delete_file(model_path)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
@ -71,7 +71,7 @@ def upload_model(project_id:int, file: UploadFile = File(...)):
|
|||||||
|
|
||||||
@router.get("/download/projects/{project_id}/models/{model_key}")
|
@router.get("/download/projects/{project_id}/models/{model_key}")
|
||||||
def download_model(project_id:int, model_key:str):
|
def download_model(project_id:int, model_key:str):
|
||||||
model_path = join_path("resources", "projects", project_id, "models", model_key)
|
model_path = join_path("resources", "projects", str(project_id), "models", model_key)
|
||||||
try:
|
try:
|
||||||
filename = get_file_name(model_path)
|
filename = get_file_name(model_path)
|
||||||
# 파일 응답 반환
|
# 파일 응답 반환
|
||||||
|
Loading…
Reference in New Issue
Block a user