feat:Add support for binary file uploads in chatflow and agentflow execution#5834
feat:Add support for binary file uploads in chatflow and agentflow execution#5834okurayhan wants to merge 2 commits intoFlowiseAI:mainfrom
Conversation
Summary of ChangesHello @okurayhan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the platform's capabilities by introducing support for binary file uploads within Chatflow and Agentflow executions. Users can now upload files, and their content will be made available as a Base64 encoded string via the new Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for binary file uploads in agentflow and chatflow executions by adding a new {{file_attachment_bin}} variable. While the changes correctly propagate the new uploadedFilesBinaryContent property through the agentflow execution path, a significant issue is that the new variable is not resolved in regular chatflows, as the corresponding logic has not been updated. Additionally, there is some code duplication in the UI that could be refactored for better maintainability, and a series of if statements could be optimized into an if-else if chain for better efficiency and clarity. I've left specific comments with suggestions.
Summary
This PR adds support for using binary file uploads in Chatflow and Agentflow execution.
With the new variable:
{{file_attachment_bin}}you can now access files uploaded via full file upload in Base64 format.
What is now possible?
{{file_attachment_bin}}can be used in:This enables passing uploaded file content directly into prompt logic or downstream tools that require Base64 input.
Changes
{{file_attachment_bin}}Example Usage
Use the following variable where Base64 file content is needed:
{{file_attachment_bin}}Notes
Screenshots