If you look at the getbinaryfile
method signature you will notice that the default value for the second parameter (localfile
) is not nil
but File.basename(remotefile)
getbinaryfile(remotefile,
localfile=File.basename(remotefile),
blocksize=DEFAULT_BLOCKSIZE)
If you want localfile
to be nil
you have to pass it explicitly:
ftp.getbinaryfile(file, nil)