From 75a7ab6d5197c62c20bc2ff52f1ae9b7164c92a8 Mon Sep 17 00:00:00 2001 From: franzyke Date: Sun, 24 Jul 2022 00:16:43 +0530 Subject: [PATCH] Update MediaManager.php fixes Call to undefined method League\Flysystem\Filesystem::getConfig() on image files --- src/MediaManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaManager.php b/src/MediaManager.php index 8fa93ee..9ca7b31 100644 --- a/src/MediaManager.php +++ b/src/MediaManager.php @@ -264,7 +264,7 @@ public function getFilePreview($file) switch ($this->detectFileType($file)) { case 'image': - if ($this->storage->getDriver()->getConfig()->has('url')) { + if (method_exists($this->storage->getDriver(), 'getConfig') && $this->storage->getDriver()->getConfig()->has('url')) { $url = $this->storage->url($file); $preview = "\"Attachment\""; } else {