Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get file into variable #62

Open
hershyheilpern opened this issue Jan 18, 2018 · 1 comment
Open

get file into variable #62

hershyheilpern opened this issue Jan 18, 2018 · 1 comment

Comments

@hershyheilpern
Copy link

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

@hardy925
Copy link

hardy925 commented Jan 26, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants