mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-27 22:46:04 +00:00
ref
This commit is contained in:
@@ -81,16 +81,15 @@ class UploadUrlService
|
||||
throw new ErrorSilent("Bad image data.");
|
||||
}
|
||||
|
||||
$attachment->set([
|
||||
'name' => $url,
|
||||
'type' => $type,
|
||||
'contents' => $contents,
|
||||
'role' => Attachment::ROLE_ATTACHMENT,
|
||||
]);
|
||||
$attachment
|
||||
->setName($url)
|
||||
->setType($type)
|
||||
->setContents($contents)
|
||||
->setRole(Attachment::ROLE_ATTACHMENT)
|
||||
->setTargetField($data->getField());
|
||||
|
||||
$attachment->set('parentType', $data->getParentType());
|
||||
$attachment->set('relatedType', $data->getRelatedType());
|
||||
$attachment->set('field', $data->getField());
|
||||
|
||||
$size = mb_strlen($contents, '8bit');
|
||||
$maxSize = $this->detailsObtainer->getUploadMaxSize($attachment);
|
||||
|
||||
Reference in New Issue
Block a user