Skip to content
Myr

Request#download() now accepts second filename arg

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 8574edd · Browse files · 3 files+75 added−157 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+75 added−157 removed

  • tests:+64 added−95 removed
  • other:+11 added−62 removed

3 files+75 added−157 removed

modified:lib/express/plugins/static.js+6 added-57 removed
modified:lib/express/request.js+5 added-5 removed
307 unmodified lines
308 },309 310 /**311 * Set Content-Disposition header to 'attachment',312 * with optional file _path_.312 * with optional file _filename_.313 *314 * @param {string} path314 * @param {string} filename315 * @return {Request}316 * @api public317 */318 319 attachment: function(path) {320 this.header('content-disposition', path321 ? 'attachment; filename="' + path + '"'319 attachment: function(filename) {320 this.header('content-disposition', filename321 ? 'attachment; filename="' + filename + '"'322 : 'attachment')323 return this324 },325
65 unmodified lines
modified:spec/spec.plugins.static.js+64 added-95 removed