node-ftps icon indicating copy to clipboard operation
node-ftps copied to clipboard

get file into variable

Open hershyheilpern opened this issue 7 years ago • 1 comments

how can i get the downloaded file into a variable
and upload a file from a variable

hershyheilpern avatar Jan 18 '18 15:01 hershyheilpern

This is not an issue, but a how-to question. It's probably better to ask on stackoverflow or some other network.

  1. Use ftps.get() to retrieve the file, use node fs to read the downloaded file into a variable
  2. Use node fs to stream the variable contents into a file, use ftps.put() to upload the newly created file to the server.

Both of these should consider async await with promises or npm-async with callbacks

hardy925 avatar Jan 26 '18 17:01 hardy925