From 3012f12f83c367331dadc7912978870ec66e3d02 Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 24 Jan 2020 10:28:56 -0500 Subject: blobs: use filename query parameter instead of file Match how multiblob-http does it. --- lib/serve.js | 4 ++-- 1 file 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') -- cgit v1.2.3