Fix file upload handling in SftpView by adding a check for undefined files before uploading.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user