节点综合
Synology NAS API的简单包装。
安装
$ npm install synology
用法
var Synology = require ( 'synology' ) ;
var syno = new Synology ( {
host : 'localhost' ,
user : 'mylogin' ,
password : 'mypassword'
} ) ;
syno . fileStation . upload ( {
file : fs . createReadStream ( path . join ( __dirname , 'foo.txt' ) ) ,
dest_folder_path : '/home'
} , function ( err , data ) {
if ( err ) throw err ;
co
1