From a018d06419df1954861164ab2e63ffce53b6983b Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 9 Apr 2022 16:37:54 +0100 Subject: [PATCH] Restrict allowed uploads - contact image --- CRM/Contact/Form/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 8beb4d3e11..1fac598d16 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -811,7 +811,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { CRM_Contact_Form_Location::buildQuickForm($this); // add attachment - $this->addField('image_URL', ['maxlength' => '255', 'label' => ts('Browse/Upload Image')]); + $this->addField('image_URL', ['maxlength' => '255', 'label' => ts('Browse/Upload Image'), 'accept' => 'image/png, image/jpeg, image/gif']); // add the dedupe button $this->addElement('xbutton', -- 2.25.1