workflow files bug, can not upload file. #5401

Closed
opened 2026-02-21 18:10:49 -05:00 by yindo · 2 comments
Owner

Originally created by @Alixxxxxxx on GitHub (Sep 5, 2024).

image

image

Originally created by @Alixxxxxxx on GitHub (Sep 5, 2024). ![image](https://github.com/user-attachments/assets/84444471-2dcc-463f-87fb-955daba33c00) ![image](https://github.com/user-attachments/assets/43564211-2b57-4414-8c5f-494d997843de)
yindo added the 🐞 bug label 2026-02-21 18:10:49 -05:00
yindo closed this issue 2026-02-21 18:10:49 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 5, 2024):

@Alixxxxxxx Hello there! I'm here to help you with any bugs, questions, or contributions while waiting for a human maintainer. Let's get this sorted out together!

I found a similar issue related to file uploads in Dify version 1. The problem might be due to the upload_file_id not being properly set for local files. Here's a relevant code snippet that checks if the file has a transfer_method of local_file and if it lacks an upload_file_id. If any file meets these conditions, the isFileLoaded flag is set to false, preventing the run button from being enabled:

const isFileLoaded = (() => {
  // system files
  const filesForm = forms.find(item => !!item.values['#files#'])
  if (!filesForm)
    return true
  const files = filesForm.values['#files#'] as any
  if (files?.some((item: any) => item.transfer_method === TransferMethod.local_file && !item.upload_file_id))
    return false

  return true
})()

To resolve this issue, ensure that the upload_file_id is correctly set for all local files before attempting to run the workflow [1].

Additionally, there are known limitations related to file uploads in Dify:

  1. The upload size limit for a single document is 15MB.
  2. The maximum number of files for a single batch upload is 5.
  3. Different subscription plans for the SaaS version limit batch upload numbers, total document uploads, and vector storage.
  4. There is a limit of 100 total documents for knowledge uploads, which can be adjusted in local deployments [2][3].

If these limitations are not the cause, you might want to check the configuration settings related to file uploads in both cloud and self-hosted environments [4][5][6].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 5, 2024): <!-- Greeting --> @Alixxxxxxx Hello there! I'm here to help you with any bugs, questions, or contributions while waiting for a human maintainer. Let's get this sorted out together! <!-- Answer --> I found a similar issue related to file uploads in Dify version 1. The problem might be due to the `upload_file_id` not being properly set for local files. Here's a relevant code snippet that checks if the file has a `transfer_method` of `local_file` and if it lacks an `upload_file_id`. If any file meets these conditions, the `isFileLoaded` flag is set to `false`, preventing the run button from being enabled: ```tsx const isFileLoaded = (() => { // system files const filesForm = forms.find(item => !!item.values['#files#']) if (!filesForm) return true const files = filesForm.values['#files#'] as any if (files?.some((item: any) => item.transfer_method === TransferMethod.local_file && !item.upload_file_id)) return false return true })() ``` To resolve this issue, ensure that the `upload_file_id` is correctly set for all local files before attempting to run the workflow <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/_base/components/before-run-form/index.tsx)</sup>. Additionally, there are known limitations related to file uploads in Dify: 1. The upload size limit for a single document is 15MB. 2. The maximum number of files for a single batch upload is 5. 3. Different subscription plans for the SaaS version limit batch upload numbers, total document uploads, and vector storage. 4. There is a limit of 100 total documents for knowledge uploads, which can be adjusted in local deployments <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/create-knowledge-and-upload-documents.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-orchestrate/llms-use-faq.md)</sup>. If these limitations are not the cause, you might want to check the configuration settings related to file uploads in both cloud and self-hosted environments <sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/jp/getting-started/install-self-hosted/environments.md)</sup><sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup><sup>[[6]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/environments.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 5, 2024):

Please do not modify the template.

@crazywoola commented on GitHub (Sep 5, 2024): Please do not modify the template.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5401