node-ftps
node-ftps copied to clipboard
get file into variable
how can i get the downloaded file into a variable
and upload a file from a variable
This is not an issue, but a how-to question. It's probably better to ask on stackoverflow or some other network.
- Use
ftps.get()to retrieve the file, usenode fsto read the downloaded file into a variable - Use
node fsto stream the variable contents into a file, useftps.put()to upload the newly created file to the server.
Both of these should consider async await with promises or npm-async with callbacks