diff --git a/components/lib/fileupload/FileUpload.js b/components/lib/fileupload/FileUpload.js index ea073f4de8..eba2380c8b 100644 --- a/components/lib/fileupload/FileUpload.js +++ b/components/lib/fileupload/FileUpload.js @@ -323,7 +323,8 @@ export const FileUpload = React.memo( formatSize, onFileSelect, getInput: () => fileInputRef.current, - getContent: () => contentRef.current + getContent: () => contentRef.current, + getFiles: () => filesState })); const createChooseButton = () => { diff --git a/components/lib/fileupload/fileupload.d.ts b/components/lib/fileupload/fileupload.d.ts index 4d0b2d8d5b..6d836e8988 100644 --- a/components/lib/fileupload/fileupload.d.ts +++ b/components/lib/fileupload/fileupload.d.ts @@ -134,4 +134,5 @@ export declare class FileUpload extends React.Component { public onFileSelect(event: FileUploadSelectParams): void; public getElement(): HTMLElement; public getInput(): HTMLInputElement; + public getFiles(): File[]; }