Skip to content

fix: The default suffix for workflow file upload nodes is set to uppercase DOC and PPT #3125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025

Conversation

shaohuzhang1
Copy link
Contributor

fix: The default suffix for workflow file upload nodes is set to uppercase DOC and PPT

@@ -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.

@shaohuzhang1 shaohuzhang1 merged commit 347f4a0 into main May 21, 2025
4 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@main@fix_file_upload branch May 21, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant