[BUG] 500 Error in Attachments API: isValidUUID is not a function
Describe the bug : The /api/v1/attachments/{chatflowId}/{chatId} endpoint returns a 500 Internal Server Error with the message: "Error: attachmentService.createAttachment - (0 , flowise_components_1.isValidUUID) is not a function". This prevents file uploads through the API.
To Reproduce Steps to reproduce the behavior:
- Set up a Flowise instance with file uploads enabled
- Try to upload a file using the attachments API endpoint
- Send a POST request to /api/v1/attachments/{chatflowId}/{chatId} with a file in the form data
- Receive a 500 error
Expected behavior The API should accept the file upload and return the file information that can be used in subsequent prediction API calls.
Screenshots Error response from Postman:
{ "statusCode": 500, "success": false, "message": "Error: attachmentService.createAttachment - (0 , flowise_components_1.isValidUUID) is not a function", "stack": {} }
Setup Installation: Docker from : https://hub.docker.com/r/elestio/flowiseai Flowise Version: [email protected]
Additional context After investigating the code, I found that the issue appears to be related to the isValidUUID function. This function is defined in validator.ts but seems to be incorrectly exported or not properly included in the build process. The function is being imported from flowise-components in the createAttachment.ts file, but the import is failing at runtime.
This is likely a build/packaging issue rather than a code logic error. The function exists but is not being properly exported from the components package.
same issue here
same issue here,When can this problem be solved
can anyone confirm if this is resolved in 2.2.8? I tested on Docker with the version, works fine
resolved in version 2.2.8
related: https://github.com/FlowiseAI/Flowise/issues/3645