[COMPONENT][Attachment] Vinculate note information with attachment controllers

Various minor bug fixes
This commit is contained in:
2021-12-27 02:47:04 +00:00
parent fd44bc3ac5
commit c4dacd7626
18 changed files with 95 additions and 63 deletions

View File

@@ -376,7 +376,7 @@ class Note extends Model
$attr['attachment'][] = [
'type' => 'Document',
'mediaType' => $attachment->getMimetype(),
'url' => $attachment->getUrl(Router::ABSOLUTE_URL),
'url' => $attachment->getUrl(note: $object, type: Router::ABSOLUTE_URL),
'name' => AttachmentToNote::getByPK(['attachment_id' => $attachment->getId(), 'note_id' => $object->getId()])->getTitle(),
'width' => $attachment->getWidth(),
'height' => $attachment->getHeight(),