Merge branch 'master' of https://github.com/openstf/stf into s3insteadoftmp

This commit is contained in:
tchibana
2015-10-20 01:34:05 +09:00
180 changed files with 5434 additions and 1532 deletions

View File

@@ -138,6 +138,10 @@ module.exports = function(options) {
app.get('/s/blob/:id/:name', function(req, res) {
var file = storage.retrieve(req.params.id)
if (file) {
if (typeof req.query.download !== 'undefined') {
res.set('Content-Disposition',
'attachment; filename="' + path.basename(file.name) + '"')
}
res.set('Content-Type', file.type)
res.sendFile(file.path)
}