node-ftp
node-ftp copied to clipboard
Uploading a directory?
I think put(input, destPath, useCompression)
seems to be for files only.
I need to upload a directory, including all sub directories and files, and the directory structure will be many levels deep.
Is there a method for uploading a directory that I'm missing in the docs..? I ask because I imagine this is a very common task when FTP'ing.
Or is my only option to write my own recursive function..?
Hi,
I'm not part of this project, but by checking the sources it looks like the internal _store
uses the fs.createReadStream(input)
function in order to read input file, which doesn't allow to read from a directory.
Despite this limitation, using your own function may not be that hard, eg. using a helper library such as async could be an efficient solution.
ftp-deploy work for me