Upgrade to 3.4.4
This commit is contained in:
@@ -86,7 +86,7 @@ class Media
|
||||
* given filename and then calls the thumb
|
||||
* component to create a thumbnail accordingly
|
||||
*
|
||||
* @param \Kirby\Cms\Model $model
|
||||
* @param \Kirby\Cms\Model|string $model
|
||||
* @param string $hash
|
||||
* @param string $filename
|
||||
* @return \Kirby\Cms\Response|false
|
||||
@@ -95,11 +95,14 @@ class Media
|
||||
{
|
||||
$kirby = App::instance();
|
||||
|
||||
// assets
|
||||
if (is_string($model) === true) {
|
||||
// assets
|
||||
$root = $kirby->root('media') . '/assets/' . $model . '/' . $hash;
|
||||
// parent files for file model that already included hash
|
||||
} elseif (is_a($model, '\Kirby\Cms\File')) {
|
||||
$root = dirname($model->mediaRoot());
|
||||
// model files
|
||||
} else {
|
||||
// model files
|
||||
$root = $model->mediaRoot() . '/' . $hash;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user