Cannot export file in workflow
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.3.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I created a workflow which create a docx file
In test mode, the file can successfully created and download
But when deploy in web app, The workflow is sucessfully finished, but no file shown
What is wrong here
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
I found two similar discussions that might be relevant to your issue:
-
The workflow is published as a tool and the output variable files cannot fetch the file - This discussion is still open and might provide insights into handling file outputs in workflows [1].
-
How can I output a file in
Workflow- This discussion is also open and addresses issues related to file outputs in workflows [2].
Regarding your issue, when deploying a workflow as a web app, Dify processes file outputs by checking if they contain files with a specific identity (__dify__file__). These files are then displayed in a FileList component, allowing users to download or preview them. If the files are not appearing, it might be due to a misconfiguration or an issue with how the files are being processed in the deployed environment [3].
Additionally, ensure that your self-hosted setup is correctly configured for file export. You need to set the FILES_URL parameter in the docker/.env file to match your Dify access address, and verify that the volumes section in your docker-compose-template.yaml file includes a mount for the storage directory to the container [4][5].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other