Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created September 19, 2016 18:25
Show Gist options
  • Save rdegges/b8856a77910b9d287a41aff6e7b20008 to your computer and use it in GitHub Desktop.
Save rdegges/b8856a77910b9d287a41aff6e7b20008 to your computer and use it in GitHub Desktop.
express-stormapth-s3 file download example
app.get('/download', stormpath.loginRequired, (req, res, next) => {
req.user.downloadFile('some-file.txt', '/tmp/some-file.txt', err => {
if (err) return next(err);
res.send('file downloaded!');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment