Skip to content

Commit

Permalink
Added mime field to ezimage field type
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Oct 24, 2023
1 parent 6893ad6 commit a966134
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/FieldType/Image/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public function toHash(SPIValue $value)
'width' => $value->width,
'height' => $value->height,
'additionalData' => $value->additionalData,
'mime' => $value->mime,
];
}

Expand Down Expand Up @@ -387,6 +388,7 @@ public function fromPersistenceValue(FieldValue $fieldValue)
? $fieldValue->data['height']
: null),
'additionalData' => $fieldValue->data['additionalData'] ?? [],
'mime' => $fieldValue->data['mime'] ?? null,
]
);

Expand Down
3 changes: 3 additions & 0 deletions src/lib/FieldType/Image/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ class Value extends BaseValue
/** @var string[] */
public $additionalData = [];

/** @var string|null */
public $mime;

/**
* Construct a new Value object.
*/
Expand Down

0 comments on commit a966134

Please sign in to comment.