From c9eb53cc1aa9edb19d4f0731df0ae91e394bf49a Mon Sep 17 00:00:00 2001 From: Adam Halasz Date: Fri, 3 Mar 2017 02:16:30 +0100 Subject: [PATCH] v0.14.1 - Bugfix for `$.download` when calling `$.sendFile` send the proper encoding not the name. #67 --- Changelog.md | 3 +++ controllers/protocols/http/signal.js | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index b897fa0..b30aae5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +## v0.14.1 - March 3, 2017 +- Bugfix for `$.download` when calling `$.sendFile` send the proper encoding not the name. #67 + ## v0.14.0 - March 3, 2017 - Introducing `$.download(path, filename)` #67 - Download Test diff --git a/controllers/protocols/http/signal.js b/controllers/protocols/http/signal.js index db038de..64f8e7f 100644 --- a/controllers/protocols/http/signal.js +++ b/controllers/protocols/http/signal.js @@ -65,7 +65,7 @@ download: function(path, name, encoding){ var filename = name ? name : Path.basename(path) signal.setHeader('Content-Disposition', 'attachment; filename="'+filename+'"') - signal.sendFile(path, name, encoding) + signal.sendFile(path, encoding) }, redirect: function(input, statusCode, isLast){ if(input.substring(0, 4) === 'back') { diff --git a/package.json b/package.json index 87edf43..a04c561 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "diet", - "version": "0.14.0", + "version": "0.14.1", "description": "A tiny, fast and modular node.js web framework. Good for making fast & scalable apps and apis.", "homepage": "http://dietjs.com/", "keywords": [