Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/workflow/nodes/base-node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ const switchFileUpload = () => {
audio: false,
video: false,
other: false,
otherExtensions: ['ppt', 'doc']
otherExtensions: ['PPT', 'DOC']
}

if (form_data.value.file_upload_enable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code you provided has one minor issue that needs to be addressed:

The otherExtensions array now contains uppercase extensions ('PPT', 'DOC') instead of lowercase ('ppt', 'doc'). This may cause mismatches between file types detected on the client side and those stored in your backend/database.

To make sure both client-side and server-side representations are consistent, it would be best to use the same case throughout. If this is acceptable based on how your system handles files, you can remove this change. Alternatively, ensure all other places where these extensions are matched conform to this new casing convention.

Here's an updated version with no changes needed for your specific question but still providing context:

const switchFileUpload = () => {
  // ... rest of the function remains unchanged ...
}

if (form_data.value.file_upload_enable) {
  // ... continue with the rest of the logic if necessary ...
}

No need to add or remove anything else unless you specifically want to handle filenames differently on either end. The rest of the code looks clean apart from the extension typo mentioned above.

Expand Down