From 171a227856bd5f31e97828d89f83f3741004d05e Mon Sep 17 00:00:00 2001 From: karrix Date: Sun, 2 Mar 2025 03:55:18 +0800 Subject: [PATCH] add: 3d upload support --- custom_routes.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/custom_routes.py b/custom_routes.py index 9bcd569..f79122b 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -1992,6 +1992,16 @@ async def upload_in_background( items = data.get(file_type, []) for item in items: + # if is model_file, just add it to the data + if file_type == "model_file": + if isinstance(item, str): + filename = os.path.basename(item) + item = { + "filename": filename, + "subfolder": "", + "type": "output", + } + # Skip temp files if item.get("type") == "temp": continue