Javascript Gulp乙烯基ftp更新和不同大小的文件不上载
具有此功能,可以上载新的和不同大小的文件conn.DIFFETSIZE remoteFolder[,选项] 我试图测试,只有较新的文件将上传,到目前为止,没有发生任何事情,文件只是没有上传。这是我的配置Javascript Gulp乙烯基ftp更新和不同大小的文件不上载,javascript,node.js,ftp,gulp,ftp-client,Javascript,Node.js,Ftp,Gulp,Ftp Client,具有此功能,可以上载新的和不同大小的文件conn.DIFFETSIZE remoteFolder[,选项] 我试图测试,只有较新的文件将上传,到目前为止,没有发生任何事情,文件只是没有上传。这是我的配置 gulp.task( 'deploy', function() { var conn = ftp.create( { host: hostremote, user: userremote, password: passremote, parall
gulp.task( 'deploy', function() {
var conn = ftp.create( {
host: hostremote,
user: userremote,
password: passremote,
parallel: 10,
log:true
} );
var globs = [
'*',
'build/**',
'dist/**',
'fonts/**',
'html/**',
'IE6/**',
'images/**',
'include/**',
'js/**',
'language/**',
'lib/**',
'!node_modules',
'!original',
'!node_modules/**',
'!original/**'
];
// using base = '.' will transfer everything to /public_html correctly
// turn off buffering in gulp.src for best performance
return gulp.src( globs, { base: '.', buffer: false } )
.pipe( conn.newerOrDifferentSize( '/test2' ) )
.pipe( conn.dest('/test') );} );
有什么想法吗?正如海基指出的,远程路径必须相同;否则,newerOrDifferentSize会将images/foo.png与test2/images/foo.png进行比较,然后肯定会上传到test/images/foo.png
如果这不能解决问题,您是否介意在打开完整日志时出现问题,可能还有您的FTP服务器软件?这可能是一个错误。为什么您的远程文件夹在conn.newerOrDifferentSize和conn.dest调用中不同?只是为了测试一下