From 571f284d31fa0cafe967ed4476d80aeb0159f732 Mon Sep 17 00:00:00 2001 From: wuting Date: Tue, 16 Jun 2020 01:11:56 +0800 Subject: [PATCH] feat: support sftp --- plugins/drive.sftp.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/drive.sftp.js b/plugins/drive.sftp.js index b0b3d6f8..3e81434f 100644 --- a/plugins/drive.sftp.js +++ b/plugins/drive.sftp.js @@ -4,13 +4,13 @@ const { PassThrough } = require('stream') -const SFTP = require('ssh2-sftp-client'); +const SFTPClient = require('ssh2-sftp-client'); const { URL } = require("url") const CLOSED = Symbol('client_closed') -class FTP { +class SFTP { constructor() { this.name = 'sftp' this.label = 'SFTP' @@ -32,7 +32,7 @@ class FTP { return { client : clientMap[key] , path:pathname } } - let client = new SFTP(); + let client = new SFTPClient(); let options = { host:hostname @@ -147,4 +147,4 @@ class FTP { } -module.exports = FTP \ No newline at end of file +module.exports = SFTP \ No newline at end of file