F
F
fantazerno2016-06-27 22:32:24
JavaScript
fantazerno, 2016-06-27 22:32:24

Is vinyl-ftp not working correctly?

There is such a config, everything works, but not all files are thrown off, always in a random amount. Maybe the hoster cuts off the session.

gulp.task( 'ftp', function() {
    var ftpConf = JSON.parse(fs.readFileSync('./ftp.json'));
    var conn = ftp.create( {
        host:     myhost',
        user:     ftpConf.user,
        password: ftpConf.pass,
        parallel: 21,
    } );
    var globs = [
       'dist/css/',
        'dist/fonts/',
        'dist/img/',
        'dist/js/',
        'dist/*.html'
    ];
   return gulp.src(globs, {buffer: false})
        .pipe( conn.newer( 'httpdocs/myhost/'+ftpConf.name) )
        .pipe( conn.dest( 'httpdocs/myhost/'+ftpConf.name) );

} );

Thanks in advance for your advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fantazerno, 2016-06-27
@fantazerno

It looks like the problem was in the number of parallel connections

var conn = ftp.create( {
        host:     'myhost',
        user:     ftpConf.user,
        password: ftpConf.pass,
        parallel: 1,
        maxConnections:1
    } );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question