Skip to content

Commit d448abc

Browse files
committed
Remove todos - github issues added
1 parent f1d2484 commit d448abc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Factory/Uploadable/MediaObjectFactory.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ public function createMediaObjects(object $object): ?ArrayCollection
6060

6161
foreach ($configuredProperties as $fileProperty => $fieldConfiguration) {
6262
$propertyMediaObjects = [];
63-
// 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
63+
6464
$filesystem = $this->filesystemProvider->getFilesystem($fieldConfiguration->adapter);
6565
$path = $classMetadata->getFieldValue($object, $fieldConfiguration->property);
6666
if (!$path) {
6767
continue;
6868
}
69+
6970
if (!$filesystem->fileExists($path)) {
7071
continue;
7172
}
@@ -160,8 +161,6 @@ private function createFromImagine(string $contentUrl, string $path, string $ima
160161
return $this->populateMediaObjectFromCache($mediaObject, $fileInfo);
161162
}
162163

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

0 commit comments

Comments
 (0)