From 32bb1456e23a32c7f45079c3985bf732dd0d276d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 16 Feb 2016 16:28:11 -0500 Subject: [PATCH] (feat) attachment size upload using WOMaxUploadSize (fixes #3510 and #3135) --- NEWS | 4 ++++ UI/MailerUI/UIxMailEditor.m | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index e8bedbf2a..a508400be 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ 2.3.9 (2016-XX-XX) ------------------ +New features + - you can now limit the file upload size using the WOMaxUploadSize + configuration parameter (integer value in kilobytes) (#3510, #3135) + Enhancements - allow resources to prevent invitations (#3410) - now support EAS MIME truncation diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index fcc0285ee..661bc1ecf 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -593,6 +593,12 @@ static NSArray *infoKeys = nil; if ([[mimeType type] isEqualToString: @"multipart"]) { httpBody = [[request httpRequest] body]; + + // We got an exception from SOPE - most likely due to + // WOMaxUploadSize being reached. + if ([httpBody isKindOfClass: [NSException class]]) + return httpBody; + filenames = [self _scanAttachmentFilenamesInRequest: httpBody]; co = [self clientObject];