From 1aefc14e422099ee4c46898759be551b679cc1c2 Mon Sep 17 00:00:00 2001 From: liumangmang Date: Wed, 4 Feb 2026 11:40:24 +0800 Subject: [PATCH] Fix file upload handling in SftpView by adding a check for undefined files before uploading. --- frontend/src/views/SftpView.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/SftpView.vue b/frontend/src/views/SftpView.vue index d567eda..0b25c21 100644 --- a/frontend/src/views/SftpView.vue +++ b/frontend/src/views/SftpView.vue @@ -147,7 +147,9 @@ async function handleFileSelect(e: Event) { const path = currentPath.value === '.' ? '' : currentPath.value try { for (let i = 0; i < selected.length; i++) { - await sftpApi.uploadFile(connectionId.value, path, selected[i]) + const file = selected[i] + if (!file) continue + await sftpApi.uploadFile(connectionId.value, path, file) } loadPath() } catch {