Skip to content

Commit

Permalink
Remove todos - github issues added
Browse files Browse the repository at this point in the history
  • Loading branch information
silverbackdan committed Jan 27, 2023
1 parent f1d2484 commit d448abc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Factory/Uploadable/MediaObjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public function createMediaObjects(object $object): ?ArrayCollection

foreach ($configuredProperties as $fileProperty => $fieldConfiguration) {
$propertyMediaObjects = [];
// todo: we may need to look at the performance of this when getting the components. yes, the response is cached, but even first load on a page with lots of files, could be very bad

$filesystem = $this->filesystemProvider->getFilesystem($fieldConfiguration->adapter);
$path = $classMetadata->getFieldValue($object, $fieldConfiguration->property);
if (!$path) {
continue;
}

if (!$filesystem->fileExists($path)) {
continue;
}
Expand Down Expand Up @@ -160,8 +161,6 @@ private function createFromImagine(string $contentUrl, string $path, string $ima
return $this->populateMediaObjectFromCache($mediaObject, $fileInfo);
}

// todo: check why we are setting this, from imagine we should know this info I'm guessing
// todo: should we not save the info to cache as well as above?
$mediaObject->width = $mediaObject->height = $mediaObject->fileSize = -1;
$mediaObject->mimeType = '';

Expand Down

0 comments on commit d448abc

Please sign in to comment.