Skip to content

Commit

Permalink
fix: upload Output format String (#1907)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

# Snapshots:

Include snapshots for easier review.

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have already rebased the commits and make the commit message
conform to the project standard.
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
Dreammy23 authored Aug 28, 2024
2 parents 47777da + 66204c1 commit c25f905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/components/flow/canvas-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type CanvasNodeProps = {
function TypeLabel({ label }: { label: string }) {
return <div className='w-full h-8 align-middle font-semibold'>{label}</div>;
}
const forceTypeList = ['file', 'multiple_files', 'time'];
const forceTypeList = ['file', 'multiple_files', 'time','images','csv_file'];

const CanvasNode: React.FC<CanvasNodeProps> = ({ data }) => {
const node = data;
Expand Down
4 changes: 2 additions & 2 deletions web/components/flow/node-renderer/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const renderUpload = (params: Props) => {
if (data.ui.attr.max_count === 1) {
formValuesChange({file:urlList.current.toString()},{force:true})
}else{
formValuesChange({multiple_files:urlList.current},{force:true})
formValuesChange({multiple_files:JSON.stringify(urlList.current)},{force:true})
}
};

Expand All @@ -41,7 +41,7 @@ export const renderUpload = (params: Props) => {
if (data.ui.attr.max_count === 1) {
formValuesChange({file:urlList.current.toString()},{force:true})
}else{
formValuesChange({multiple_files:urlList.current},{force:true})
formValuesChange({multiple_files:JSON.stringify(urlList.current)},{force:true})
}
};

Expand Down

0 comments on commit c25f905

Please sign in to comment.