Fixed params getting lost in MediumFactory

This commit is contained in:
Djamil Legato
2022-02-18 21:39:22 -08:00
parent b5d6478ce9
commit e9f047f783
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ abstract class LocalMedia extends AbstractMedia
$relativePath = Folder::getRelativePath($filename, $this->getPath());
$info = $this->index[$relativePath] ?? null;
if (null === $info && file_exists($filename)) {
return MediumFactory::fromFile($filename);
return MediumFactory::fromFile($filename, $params);
}
$filename = $relativePath;

View File

@@ -133,7 +133,7 @@ class Medium extends Data implements RenderableInterface, MediaFileInterface
* @param string $thumb
* @return MediaObjectInterface|null
*/
protected function createThumbnail($thumb)
protected function createThumbnail($thumb): ?MediaObjectInterface
{
return $this->getMedia()->createFromFile($thumb, ['type' => 'thumbnail']);
}