The files in the chat history are not accessible. #14628

Closed
opened 2026-02-21 19:18:06 -05:00 by yindo · 4 comments
Owner

Originally created by @JayHsu5 on GitHub (Jun 15, 2025).

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

latest

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Enter the chat conversation.
  2. Upload file.
  3. Refresh the page.
  4. Continue the conversation.

✔️ Expected Behavior

Continue the conversation.

Actual Behavior

Originally created by @JayHsu5 on GitHub (Jun 15, 2025). ### 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 latest ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Enter the chat conversation. 2. Upload file. 3. Refresh the page. 4. Continue the conversation. ### ✔️ Expected Behavior Continue the conversation. ### ❌ Actual Behavior <!-- Failed to upload "img_v3_02na_3bca55ab-2408-475d-b053-99275ba0d7lu.gif" -->
yindo added the 🐞 bugcloud labels 2026-02-21 19:18:06 -05:00
yindo closed this issue 2026-02-21 19:18:06 -05:00
Author
Owner

@JayHsu5 commented on GitHub (Jun 15, 2025):

https://cloud.dify.ai/console/api/installed-apps/f9802f71-d829-4a30-9ced-60dbe3844e19/chat-messages

{"response_mode":"streaming","conversation_id":"5ca6db17-91b0-4b96-a4e1-c6bf94606d1a","files":[],"query":"1","inputs":{"file":{"type":"document","transfer_method":"local_file","url":"https://upload.dify.ai/files/91e6592c-6119-4043-87a4-9d950f1605cb/file-preview?timestamp=1750042037&nonce=cab949273180743cbc8d469411bf472e&sign=LdBqAfBYXmi3KUO1qEQ-eSTuJi3qCMncAnBU2bd1vDE=","upload_file_id":"91e6592c-6119-4043-87a4-9d950f1605cb"}},"parent_message_id":"24fcb197-c25a-4ae0-b92f-0cb1eeccd6e8"}

{
"code": "invalid_param",
"message": "File validation failed for file: aaaa.xlsx",
"status": 400
}

@JayHsu5 commented on GitHub (Jun 15, 2025): https://cloud.dify.ai/console/api/installed-apps/f9802f71-d829-4a30-9ced-60dbe3844e19/chat-messages {"response_mode":"streaming","conversation_id":"5ca6db17-91b0-4b96-a4e1-c6bf94606d1a","files":[],"query":"1","inputs":{"file":{"type":"document","transfer_method":"local_file","url":"https://upload.dify.ai/files/91e6592c-6119-4043-87a4-9d950f1605cb/file-preview?timestamp=1750042037&nonce=cab949273180743cbc8d469411bf472e&sign=LdBqAfBYXmi3KUO1qEQ-eSTuJi3qCMncAnBU2bd1vDE=","upload_file_id":"91e6592c-6119-4043-87a4-9d950f1605cb"}},"parent_message_id":"24fcb197-c25a-4ae0-b92f-0cb1eeccd6e8"} { "code": "invalid_param", "message": "File validation failed for file: aaaa.xlsx", "status": 400 }
Author
Owner

@dosubot[bot] commented on GitHub (Jun 15, 2025):

The "File validation failed" error for your .xlsx file can happen if the file doesn't meet certain criteria set in Dify's configuration. Dify does support .xlsx uploads, but validation checks include file extension, file size, transfer method, and possibly per-app or environment-specific restrictions. If the file is valid and within size limits, the issue may be due to stricter configuration on your app or workspace, or a mismatch in the transfer method or file metadata.

If possible, double-check:

  • The file extension is exactly .xlsx (case-sensitive).
  • The file size is within the allowed limit.
  • The upload method matches what your app expects.

If all of these look correct, there may be a custom restriction in your app's file upload configuration that blocks this file type or method. The validation logic is dynamic and can be stricter than the global defaults, even for supported extensions like .xlsx.

You can find more technical details about how Dify validates files in the code here:
file_factory.py
file_service.py

If you have access to your app's configuration, review the allowed file types and methods. If not, you may need to check with your workspace admin to confirm the current settings.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 15, 2025): <!-- Answer --> The "File validation failed" error for your .xlsx file can happen if the file doesn't meet certain criteria set in Dify's configuration. Dify does support .xlsx uploads, but validation checks include file extension, file size, transfer method, and possibly per-app or environment-specific restrictions. If the file is valid and within size limits, the issue may be due to stricter configuration on your app or workspace, or a mismatch in the transfer method or file metadata. If possible, double-check: - The file extension is exactly .xlsx (case-sensitive). - The file size is within the allowed limit. - The upload method matches what your app expects. If all of these look correct, there may be a custom restriction in your app's file upload configuration that blocks this file type or method. The validation logic is dynamic and can be stricter than the global defaults, even for supported extensions like .xlsx. You can find more technical details about how Dify validates files in the code here: [file_factory.py](https://github.com/langgenius/dify/blob/d587480a3e4c38333860331c3684ddc6f771ca01/api/factories/file_factory.py) [file_service.py](https://github.com/langgenius/dify/blob/d587480a3e4c38333860331c3684ddc6f771ca01/api/services/file_service.py) If you have access to your app's configuration, review the allowed file types and methods. If not, you may need to check with your workspace admin to confirm the current settings. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/95004cc7-9743-41bf-ad4f-ab99d3ba4304?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21038)
Author
Owner

@JayHsu5 commented on GitHub (Jun 19, 2025):

Supplement input configuration and screen recording
Image
Image

@JayHsu5 commented on GitHub (Jun 19, 2025): Supplement input configuration and screen recording ![Image](https://github.com/user-attachments/assets/7a6ccecb-ffdf-43a2-a0d2-eb2bd24001c3) ![Image](https://github.com/user-attachments/assets/9fa7689b-f3f6-4018-a8d9-1e613e45cea5)
Author
Owner

@dosubot[bot] commented on GitHub (Aug 26, 2025):

Hi, @JayHsu5. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that files uploaded in chat history on Dify's cloud version become inaccessible after a page refresh.
  • The error "File validation failed" occurs specifically for .xlsx files, possibly due to app or workspace file validation rules.
  • Potential causes include file extension restrictions, size limits, or transfer method mismatches.
  • You provided additional input configuration details and screen recordings to help with troubleshooting.
  • The issue remains unresolved with no recent updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I don’t hear back within 15 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 26, 2025): Hi, @JayHsu5. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that files uploaded in chat history on Dify's cloud version become inaccessible after a page refresh. - The error "File validation failed" occurs specifically for .xlsx files, possibly due to app or workspace file validation rules. - Potential causes include file extension restrictions, size limits, or transfer method mismatches. - You provided additional input configuration details and screen recordings to help with troubleshooting. - The issue remains unresolved with no recent updates. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I don’t hear back within 15 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14628