Skip to content

Instantly share code, notes, and snippets.

@flimshaw
Last active October 10, 2016 20:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flimshaw/a7422a1614af7f1cc1b721eb393da893 to your computer and use it in GitHub Desktop.
Save flimshaw/a7422a1614af7f1cc1b721eb393da893 to your computer and use it in GitHub Desktop.
// get the given filename from the path given
http.get({
hostname: 'cdn.gea.esac.esa.int',
port: 80,
path: `/Gaia/gaia_source/csv/${filename}`,
agent: false // create a new agent just for this one request
}, (res) => {
// stream-upload the file to Amazon S3 as it comes in
res.pipe(upload);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment