diff --git a/examples/example1/app/Model/FileStorage/Drivers/DatabaseDriver.php b/examples/example1/app/Model/FileStorage/Drivers/DatabaseDriver.php index fd49b57..be3f460 100644 --- a/examples/example1/app/Model/FileStorage/Drivers/DatabaseDriver.php +++ b/examples/example1/app/Model/FileStorage/Drivers/DatabaseDriver.php @@ -2,6 +2,7 @@ namespace Model\FileStorage\Drivers; +use Dframe\Config\Config; use Dframe\FileStorage\Drivers\DatabaseDriverInterface; use Exception; use Model\Model; @@ -83,8 +84,10 @@ public function cache($adapter, $originalPath, $cachePath, $mime, $stream = fals $cache = $this->db->select('file_cache', '*', ['file_cache_path' => $cachePath])->result(); if (empty($cache['id']) and !empty($row['file_id'])) { + $cacheConfig = Config::load('fileStorage')->get('cache'); $data = [ 'file_id' => $row['file_id'], + 'file_cache_adapter' => $cacheConfig['adapter'], 'file_cache_path' => $cachePath, 'file_cache_mime' => $mime ];