Skip to content

uploading file via API always has no response #39356

Description

@liaoyuanyi

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.14.1 & 1.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I upload any image or file through the "Send Dialog Message" API to my chatflow, the front end always displays "thinking" until it stops, with no response. When I check the Docker worker logs, the following error is reported:
ERROR [Dummy-3932] [trace.py:309] c24865ae719e52a6af155c5495e1ce2d - Task tasks.app_generate.workflow_execute_task.workflow_based_app_execution_task[6fb4fdf1-366e-443b-9f7e-512bc80b55ac] raised unexpected: ValueError('Invalid upload file')

2026-07-21 14:47:56 Traceback (most recent call last):

2026-07-21 14:47:56   File "/app/api/.venv/lib/python3.12/site-packages/celery/app/trace.py", line 585, in trace_task

2026-07-21 14:47:56     R = retval = fun(*args, **kwargs)

2026-07-21 14:47:56                  ^^^^^^^^^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/extensions/ext_celery.py", line 101, in call

2026-07-21 14:47:56     return self.run(*args, **kwargs)

2026-07-21 14:47:56            ^^^^^^^^^^^^^^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/tasks/app_generate/workflow_execute_task.py", line 269, in workflow_based_app_execution_task

2026-07-21 14:47:56     return runner.run()

2026-07-21 14:47:56            ^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/tasks/app_generate/workflow_execute_task.py", line 165, in run

2026-07-21 14:47:56     response = self._run_app(

2026-07-21 14:47:56                ^^^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/tasks/app_generate/workflow_execute_task.py", line 187, in _run_app

2026-07-21 14:47:56     return AdvancedChatAppGenerator().generate(

2026-07-21 14:47:56            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/core/app/apps/advanced_chat/app_generator.py", line 162, in generate

2026-07-21 14:47:56     file_objs = file_factory.build_from_mappings(

2026-07-21 14:47:56                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/factories/file_factory/builders.py", line 68, in build_from_mappings

2026-07-21 14:47:56     build_from_mapping(

2026-07-21 14:47:56   File "/app/api/factories/file_factory/builders.py", line 37, in build_from_mapping

2026-07-21 14:47:56     file = build_func(

2026-07-21 14:47:56            ^^^^^^^^^^^

2026-07-21 14:47:56   File "/app/api/factories/file_factory/builders.py", line 141, in _build_from_local_file

2026-07-21 14:47:56     raise ValueError("Invalid upload file")

2026-07-21 14:47:56 ValueError: Invalid upload file

✔️ Expected Behavior

The chatflow can respond to content normally.

❌ Actual Behavior

the front end always displays "thinking" until it stops, with no response.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions