Created
September 19, 2016 18:25
-
-
Save rdegges/b8856a77910b9d287a41aff6e7b20008 to your computer and use it in GitHub Desktop.
express-stormapth-s3 file download example
This file contains hidden or 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
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