diff --git a/lib/index.js b/lib/index.js index cefce38..c6da094 100644 --- a/lib/index.js +++ b/lib/index.js @@ -229,7 +229,7 @@ MongoStorage = (function() { read = gfs.createReadStream({ _id: file._id }); - res.set('Content-Disposition', "attachment; filename=\"" + file.filename + "\""); + res.attachment(file.filename); res.set('Content-Type', file.metadata.mimetype); res.set('Content-Length', file.length); return read.pipe(res);