Skip to content

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

Merged
shaohuzhang1 merged 1 commit intomainfrom
pr@main@fix_file_upload
May 21, 2025
Merged

fix: The default suffix for workflow file upload nodes is set to uppercase DOC and PPT#3125
shaohuzhang1 merged 1 commit intomainfrom
pr@main@fix_file_upload

Conversation

@shaohuzhang1
Copy link
Contributor

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

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