diff --git a/application/Espo/Services/Attachment.php b/application/Espo/Services/Attachment.php index 5b71c2924a..b64562972b 100644 --- a/application/Espo/Services/Attachment.php +++ b/application/Espo/Services/Attachment.php @@ -43,6 +43,10 @@ class Attachment extends Record $entity = parent::createEntity($data); + if (!empty($data['file'])) { + $entity->clear('contents'); + } + return $entity; } }