diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-07-14 11:41:44 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-07-18 22:00:28 -0400 |
commit | 8c1e9a2f44c4ce1dffaaedff771d19c6e1b6bf55 (patch) | |
tree | 5a4c1890e41ecb064c46e098ec9af719d0eb2f7b /lib | |
parent | c761008b5ab9e6a313b4031c440472ef39d59928 (diff) | |
download | patchfoo-8c1e9a2f44c4ce1dffaaedff771d19c6e1b6bf55.tar.gz patchfoo-8c1e9a2f44c4ce1dffaaedff771d19c6e1b6bf55.zip |
Improve blob size warning
Diffstat (limited to 'lib')
-rw-r--r-- | lib/serve.js | 8 |
1 files changed, 4 insertions, 4 deletions
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')) } }) |