diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2016-02-01 10:54:43 +0100 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2016-02-01 10:54:43 +0100 |
commit | 7b9103387f9c0405cb19f6b1add8972a804bfbd8 (patch) | |
tree | 793a4e02ef149276192a249791439e503eb4a619 /web-ui/app | |
parent | 451b2fbf67780c49afc609b584f4de71ce7d913b (diff) |
Check exactly at border limit of one megabyte
- Issue #550
- Deleted skipped test
Diffstat (limited to 'web-ui/app')
-rw-r--r-- | web-ui/app/js/mail_view/ui/attachment_list.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_view/ui/attachment_list.js b/web-ui/app/js/mail_view/ui/attachment_list.js index eb515865..f0581c67 100644 --- a/web-ui/app/js/mail_view/ui/attachment_list.js +++ b/web-ui/app/js/mail_view/ui/attachment_list.js @@ -38,6 +38,9 @@ define( uploadFileButton: '#upload-file-button' }); + var ONE_MEGABYTE = 1024*1024; + var ATTACHMENT_SIZE_LIMIT = ONE_MEGABYTE; + this.showAttachment = function (ev, data) { this.trigger(document, events.mail.appendAttachment, data); this.renderAttachmentListView(data); @@ -89,8 +92,7 @@ define( self.trigger(document, events.mail.startUploadAttachment); }; - var ONE_MEGABYTE = 1000000; - if (data.originalFiles[0].size > ONE_MEGABYTE) { + if (data.originalFiles[0].size > ATTACHMENT_SIZE_LIMIT) { uploadErrors.push('Filesize is too big'); } if (uploadErrors.length > 0) { |