Skip to content

Commit

Permalink
[BUGFIX] Fix UIDs for files depending on class implementing FileInter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
dvdmlln committed Aug 15, 2024
1 parent a2bd9a5 commit 764f88d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Utility/FileUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
use TYPO3\CMS\Core\Configuration\Features;
use TYPO3\CMS\Core\Http\NormalizedParams;
use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
use TYPO3\CMS\Core\Resource\File;
use TYPO3\CMS\Core\Resource\FileInterface;
use TYPO3\CMS\Core\Resource\FileReference;
use TYPO3\CMS\Core\Resource\ProcessedFile;
use TYPO3\CMS\Core\Resource\Rendering\RendererRegistry;
use TYPO3\CMS\Core\Utility\ArrayUtility;
Expand Down Expand Up @@ -65,8 +67,8 @@ public function process(FileInterface $fileReference, ProcessingConfiguration $p
{
$originalFileReference = clone $fileReference;
$originalFileUrl = $fileReference->getPublicUrl();
$fileReferenceUid = $fileReference->getUid();
$uidLocal = $fileReference->getProperty('uid_local');
$fileReferenceUid = $fileReference instanceof FileReference ? $fileReference->getUid() : null;
$uidLocal = $fileReference instanceof File ? $fileReference->getUid() : $fileReference->getProperty('uid_local');
$fileRenderer = $this->rendererRegistry->getRenderer($fileReference);
$crop = $fileReference->getProperty('crop');
$link = $fileReference->getProperty('link');
Expand Down

0 comments on commit 764f88d

Please sign in to comment.