reset electron files after adding them to upload

This commit is contained in:
Abhinav 2022-04-20 22:19:07 +05:30
parent fc0a6d2a83
commit 04459e18bd

View file

@ -126,12 +126,13 @@ export default function Upload(props: Props) {
props.acceptedFiles?.length > 0 ||
props.electronFiles?.length > 0
) {
if (props.acceptedFiles?.length > 0) {
// File selection by drag and drop or selection of file.
toUploadFiles.current = props.acceptedFiles;
} else {
if (props.electronFiles?.length > 0) {
// File selection from desktop app
toUploadFiles.current = props.electronFiles;
props.setElectronFiles([]);
} else {
// File selection by drag and drop or selection of file.
toUploadFiles.current = props.acceptedFiles;
}
analysisResult = analyseUploadFiles();