Skip to content

Commit

Permalink
[Bug]: Fix refresh Embedded meta info on replace asset (#340)
Browse files Browse the repository at this point in the history
* renamed with switch

* force refresh on replace

* method is only for images/videos
  • Loading branch information
kingjia90 authored Nov 9, 2023
1 parent 55f4197 commit c709702
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Controller/Admin/Asset/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ public function replaceAssetAction(Request $request, TranslatorInterface $transl
$stream = fopen($_FILES['Filedata']['tmp_name'], 'r+');
$asset->setStream($stream);
$asset->setCustomSetting('thumbnails', null);
if (method_exists($asset, 'getEmbeddedMetaData')) {
$asset->getEmbeddedMetaData(true);
}
$asset->setUserModification($this->getAdminUser()->getId());

$newFileExt = pathinfo($newFilename, PATHINFO_EXTENSION);
Expand Down

0 comments on commit c709702

Please sign in to comment.