aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-24 10:28:56 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-24 10:28:56 -0500
commit3012f12f83c367331dadc7912978870ec66e3d02 (patch)
treea2a1fe0ccabb6f20bca5a824567cfbaa0ad093f6
parent166256001fc99c65360fc71b19f9796f2524c915 (diff)
downloadpatchfoo-3012f12f83c367331dadc7912978870ec66e3d02.tar.gz
patchfoo-3012f12f83c367331dadc7912978870ec66e3d02.zip
blobs: use filename query parameter instead of file
Match how multiblob-http does it.
-rw-r--r--lib/serve.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js
index aad7159..d557e10 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1569,7 +1569,7 @@ Serve.prototype.blob = function (id, path) {
// the ciphertext
if (typeof size === 'number' && !key)
self.res.setHeader('Content-Length', size)
- if (self.query.name) self.res.setHeader('Content-Disposition',
+ if (self.query.filename) self.res.setHeader('Content-Disposition',
'inline; filename='+encodeDispositionFilename(self.query.name))
if (self.query.gzip)
res.setHeader('Content-Encoding', 'gzip')
@@ -1655,7 +1655,7 @@ Serve.prototype.image = function (path) {
type = type && mime.lookup(type)
if (type) self.res.setHeader('Content-Type', type)
self.res.setHeader('Content-Length', data.length)
- if (self.query.name) self.res.setHeader('Content-Disposition',
+ if (self.query.filename) self.res.setHeader('Content-Disposition',
'inline; filename='+encodeDispositionFilename(self.query.name))
if (self.query.gzip)
res.setHeader('Content-Encoding', 'gzip')