From 7ab784eef630a8868e84898e3cca9cfa4358cd56 Mon Sep 17 00:00:00 2001 From: iHeyTang Date: Wed, 20 Aug 2025 11:25:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=97=E6=AE=B5=E7=9A=84schema=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=92=8C?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E9=99=90=E5=88=B6=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E7=9A=84=E6=9C=89=E6=95=88?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow_service/comfy/comfy_workflow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/workflow_service/comfy/comfy_workflow.py b/workflow_service/comfy/comfy_workflow.py index 0c4db3e..fe3ffeb 100644 --- a/workflow_service/comfy/comfy_workflow.py +++ b/workflow_service/comfy/comfy_workflow.py @@ -409,7 +409,13 @@ def _generate_field_schema(input_field: dict) -> dict: ) elif field_type == "UploadFile": field_schema.update( - {"type": "string", "format": "binary", "contentMediaType": "image/*", "description": "上传文件"} + { + "type": "string", + "format": "binary", + "contentMediaType": "image/*", + "pattern": ".*\\.(jpg|jpeg|png)$", + "description": "[ext:jpg,jpeg,png][file-size:1MB] 上传图片文件", + } ) else: # string field_schema.update({"type": "string"})