diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsx index 7274b23184..3b7c8308ad 100644 --- a/web/app/components/base/chat/chat/answer/index.tsx +++ b/web/app/components/base/chat/chat/answer/index.tsx @@ -158,6 +158,7 @@ const Answer: FC = ({ { allFiles?.length && ( void onReUpload?: (fileId: string) => void @@ -14,6 +16,7 @@ type FileListProps = { showDownloadAction?: boolean } export const FileList = ({ + className, files, onReUpload, onRemove, @@ -21,7 +24,7 @@ export const FileList = ({ showDownloadAction = false, }: FileListProps) => { return ( -
+
{ files.map((file) => { if (file.supportFileType === SupportUploadFileTypes.image) { diff --git a/web/app/components/base/file-uploader/utils.ts b/web/app/components/base/file-uploader/utils.ts index f761f1026f..178f070daa 100644 --- a/web/app/components/base/file-uploader/utils.ts +++ b/web/app/components/base/file-uploader/utils.ts @@ -122,7 +122,7 @@ export const getProcessedFilesFromResponse = (files: FileResponse[]) => { return { id: fileItem.related_id, name: fileItem.filename, - size: 0, + size: fileItem.size || 0, type: fileItem.mime_type, progress: 100, transferMethod: fileItem.transfer_method, diff --git a/web/app/components/base/progress-bar/progress-circle.tsx b/web/app/components/base/progress-bar/progress-circle.tsx index 50ebc7536c..b9b280eea3 100644 --- a/web/app/components/base/progress-bar/progress-circle.tsx +++ b/web/app/components/base/progress-bar/progress-circle.tsx @@ -22,7 +22,7 @@ const ProgressCircle: React.FC = ({ }) => { const radius = size / 2 const center = size / 2 - const angle = (percentage / 100) * 360 + const angle = (percentage / 101) * 360 const radians = (angle * Math.PI) / 180 const x = center + radius * Math.cos(radians - Math.PI / 2) const y = center + radius * Math.sin(radians - Math.PI / 2) diff --git a/web/types/workflow.ts b/web/types/workflow.ts index 80698d2a7c..f642d5bfec 100644 --- a/web/types/workflow.ts +++ b/web/types/workflow.ts @@ -133,6 +133,7 @@ export type FileResponse = { related_id: string extension: string filename: string + size: number mime_type: string transfer_method: TransferMethod type: string