workflow files bug, can not upload file.
@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:
- The upload size limit for a single document is 15MB.
- The maximum number of files for a single batch upload is 5.
- Different subscription plans for the SaaS version limit batch upload numbers, total document uploads, and vector storage.
- 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.
Please do not modify the template.