From 8c1e9a2f44c4ce1dffaaedff771d19c6e1b6bf55 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 14 Jul 2020 11:41:44 -0400 Subject: Improve blob size warning --- lib/serve.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index 397a148..d09082d 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -4718,12 +4718,12 @@ Serve.prototype.composer = function (opts, cb) { 'emoji ', h('q', link.name), ' (', h('code', String(link.link).substr(0, 8) + '…'), ')' + ' is >10KB')) - } else if (link.link[0] === '&' && link.size >= 10e6 && link.type) { - // if link.type is set, we probably just uploaded this blob + } else if (link.link[0] === '&' && link.size >= 5242880) { warnings.push(h('li', - 'attachment ', + 'linked blob ', h('code', String(link.link).substr(0, 8) + '…'), - ' is >10MB')) + ' (', h('code', self.app.render.formatSize(link.size)), ')', + ' is larger than 5MB')) } }) -- cgit v1.2.3