Last active
October 10, 2016 20:26
-
-
Save flimshaw/a7422a1614af7f1cc1b721eb393da893 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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