attachments fixes

This commit is contained in:
yuri
2018-08-15 12:45:57 +03:00
parent 036e10cbf7
commit cf0a9fd808
7 changed files with 18 additions and 12 deletions
+1 -2
View File
@@ -90,10 +90,9 @@ class Import extends \Espo\Core\Controllers\Record
$attachment->set('type', 'text/csv');
$attachment->set('role', 'Import File');
$attachment->set('name', 'import-file.csv');
$attachment->set('contents', $contents);
$this->getEntityManager()->saveEntity($attachment);
$this->getFileStorageManager()->putContents($attachment, $contents);
return array(
'attachmentId' => $attachment->id
);