From 53d4edb6095bf290105a93a5ada64675bc03aee6 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Tue, 9 Jun 2026 10:43:55 -0400 Subject: [PATCH] fix(dify): send 'user' as plain form field in file upload The multipart tuple form (None, user) is httpx 'files=' syntax for a part with no filename; placed under 'data=' it expanded into a stray user=None field, so Dify associated the uploaded file with the wrong user and the workflow never received the image. Send 'user' as a plain string. --- src/langbot/libs/dify_service_api/v1/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/langbot/libs/dify_service_api/v1/client.py b/src/langbot/libs/dify_service_api/v1/client.py index cc8008e1..bc0ee8fa 100644 --- a/src/langbot/libs/dify_service_api/v1/client.py +++ b/src/langbot/libs/dify_service_api/v1/client.py @@ -145,7 +145,7 @@ class AsyncDifyServiceClient: 'file': file, }, data={ - 'user': (None, user), + 'user': user, }, )