diff --git a/src/components/pages/gallery/Upload.tsx b/src/components/pages/gallery/Upload.tsx index e7ae32cc0..188c972fb 100644 --- a/src/components/pages/gallery/Upload.tsx +++ b/src/components/pages/gallery/Upload.tsx @@ -201,10 +201,7 @@ export default function Upload(props: Props) { }; function analyseUploadFiles(): AnalysisResult { - if ( - isElectron() && - (!uploadType.current || uploadType.current === UPLOAD_TYPE.FILES) - ) { + if (isElectron() && uploadType.current === UPLOAD_TYPE.FILES) { return NULL_ANALYSIS_RESULT; } @@ -498,6 +495,7 @@ export default function Upload(props: Props) { }; const handleWebUpload = async (type: UPLOAD_TYPE) => { + uploadType.current = type; if (type === UPLOAD_TYPE.FILES) { props.showUploadFilesDialog(); } else if (type === UPLOAD_TYPE.FOLDERS) {