Skip to content
Myr

Added Request#attachment()

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

authored by visionmedia · committed by visionmedia · parent ea8f35b · Browse files · 2 files+15 added−1 removed
This commit

State

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

Diff stats

2 files+15 added−1 removed

  • tests:+1 added−1 removed
  • other:+14 added−0 removed

2 files+15 added−1 removed

modified:lib/express/request.js+14 added
210 unmodified lines
211 })212 },213 214 /**215 * Set Content-Disposition header to 'attachment',216 * with optional _filename_.217 *218 * @param {string} filename219 * @api public220 */221 222 attachment: function(filename) {223 this.header('content-disposition', filename ? 224 'attachment; filename="' + filename + '"' :225 'attachment')226 },227 228 /**229 * Transfer static file at the given _path_.230 *231 * @param {string} path232 * @api public
6 unmodified lines
modified:spec/spec.request.js+1 added-1 removed