"Invalid upload file" error in test chat history if there was file uploaded #6596

Closed
opened 2026-02-21 18:16:28 -05:00 by yindo · 1 comment
Owner

Originally created by @hanwsf on GitHub (Nov 6, 2024).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.1, 0.10.2, 0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

set upload in first step, run the workflow with upload a file, after the workflow finishes then check test run history, click the log# it will popup "invalid upload file" error.

✔️ Expected Behavior

Show testchat details as before

Actual Behavior

No testchat details and empty shown in the test history

error 2024-11-06 18-26-26

Originally created by @hanwsf on GitHub (Nov 6, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.1, 0.10.2, 0.11.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce set upload in first step, run the workflow with upload a file, after the workflow finishes then check test run history, click the log# it will popup "invalid upload file" error. ### ✔️ Expected Behavior Show testchat details as before ### ❌ Actual Behavior No testchat details and empty shown in the test history ![error 2024-11-06 18-26-26](https://github.com/user-attachments/assets/24e76a22-9fb4-4ad8-990b-c7804883d0d3)
yindo added the 🐞 bug label 2026-02-21 18:16:28 -05:00
yindo closed this issue 2026-02-21 18:16:28 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 6, 2024):

I found some relevant information that might help address the "Invalid upload file" error you're encountering in the test chat history when a file is uploaded.

  1. File Upload Changes: In Dify versions 0.10.1, 0.10.2, and 0.11.0, there were changes to the file upload functionality. The image upload feature was integrated into a more comprehensive file upload system, allowing various file types to be uploaded. This update replaced the image upload option with a file upload feature, and existing workflows may require manual migration to align with these changes [1].

  2. Error Handling: Dify uses an onErrorCallback function to handle errors during file uploads. This function is invoked if an error occurs, which might be relevant if the error is related to the upload process itself [2].

  3. Known Limitations: In a self-hosted Docker environment, there are constraints on file uploads, such as a maximum file size of 15 MB and a limit of 10 files per upload. Ensure that your uploads comply with these limits [3].

  4. Similar Issues: There have been similar issues reported, such as a "500 Internal Server Error" when uploading files, which were resolved by ensuring correct configuration of environment variables like FILES_URL and addressing changes in the MessageFile class [4].

You might want to check if your environment variables are correctly set and if your workflow aligns with the new file upload system. Additionally, reviewing any changes in the release notes for these versions might provide further insights.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 6, 2024): <!-- Answer --> I found some relevant information that might help address the "Invalid upload file" error you're encountering in the test chat history when a file is uploaded. 1. **File Upload Changes**: In Dify versions 0.10.1, 0.10.2, and 0.11.0, there were changes to the file upload functionality. The image upload feature was integrated into a more comprehensive file upload system, allowing various file types to be uploaded. This update replaced the image upload option with a file upload feature, and existing workflows may require manual migration to align with these changes <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/bulletin.md)</sup>. 2. **Error Handling**: Dify uses an `onErrorCallback` function to handle errors during file uploads. This function is invoked if an error occurs, which might be relevant if the error is related to the upload process itself <sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/base/file-uploader/utils.ts)</sup>. 3. **Known Limitations**: In a self-hosted Docker environment, there are constraints on file uploads, such as a maximum file size of 15 MB and a limit of 10 files per upload. Ensure that your uploads comply with these limits <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/environments.md)</sup>. 4. **Similar Issues**: There have been similar issues reported, such as a "500 Internal Server Error" when uploading files, which were resolved by ensuring correct configuration of environment variables like `FILES_URL` and addressing changes in the `MessageFile` class <sup>[[4]](https://github.com/langgenius/dify/issues/9733)</sup>. You might want to check if your environment variables are correctly set and if your workflow aligns with the new file upload system. Additionally, reviewing any changes in the release notes for these versions might provide further insights. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6596