From d00e9ef0420a6015f3c5a9c581471debc7ea03c4 Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 31 May 2017 14:40:41 -0400 Subject: [PATCH] CRM-20666 - allow filenames up to 255 characters 255 characters is the database limit - and we add 34 characters of random strings to the end of each name, so the real limit is 221. --- CRM/Core/BAO/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index 21e1e07874..ed6ce21e80 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -453,7 +453,7 @@ AND CEF.entity_id = %2"; // add attachments for ($i = 1; $i <= $numAttachments; $i++) { - $form->addElement('file', "attachFile_$i", ts('Attach File'), 'size=30 maxlength=60'); + $form->addElement('file', "attachFile_$i", ts('Attach File'), 'size=30 maxlength=221'); $form->addUploadElement("attachFile_$i"); $form->setMaxFileSize($maxFileSize * 1024 * 1024); $form->addRule("attachFile_$i", -- 2.25.1