Merge branch 'hotfix/6.1.4'
This commit is contained in:
@@ -69,13 +69,19 @@ class Attachment extends \Espo\Core\Repositories\Database implements
|
||||
parent::beforeSave($entity, $options);
|
||||
|
||||
$storage = $entity->get('storage');
|
||||
|
||||
if (!$storage) {
|
||||
$entity->set('storage', $this->config->get('defaultFileStorage', null));
|
||||
}
|
||||
|
||||
if ($entity->isNew()) {
|
||||
if (!$entity->has('size') && $entity->has('contents')) {
|
||||
$entity->set('size', mb_strlen($entity->get('contents')));
|
||||
$contents = $entity->get('contents');
|
||||
|
||||
$entity->set(
|
||||
'size',
|
||||
mb_strlen($contents, '8bit')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "6.1.2",
|
||||
"version": "6.1.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "6.1.2",
|
||||
"version": "6.1.3",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user