🐛 Fix: fix sftp delete error when the user don't have ssh permission

ISSUES CLOSED: #100
This commit is contained in:
Kuingsmile
2023-09-30 20:55:07 +08:00
parent ef1812a8eb
commit 819dfbb2f1
6 changed files with 41 additions and 18 deletions

View File

@@ -174,7 +174,7 @@ export default {
await client.connect(config)
const uploadPath = `/${(config.uploadPath || '')}/`.replace(/\/+/g, '/')
const remote = path.join(uploadPath, fileName)
const deleteResult = await client.deleteFile(remote)
const deleteResult = await client.deleteFileSFTP(config, remote)
client.close()
return deleteResult
} catch (err: any) {