Fix name with spaces
This commit is contained in:
@@ -80,6 +80,7 @@ class Medias
|
||||
return null;
|
||||
}
|
||||
$id = $image['id'];
|
||||
$image['name'] = str_replace(['#', '/', '\\', ' '], '-', $image['name']);
|
||||
$filename = $image['name'] . self::getExtension($image['file_name']);
|
||||
|
||||
return "/storage/$id/$filename";
|
||||
@@ -91,6 +92,7 @@ class Medias
|
||||
return null;
|
||||
}
|
||||
$id = $image['id'];
|
||||
$image['name'] = str_replace(['#', '/', '\\', ' '], '-', $image['name']);
|
||||
$filename = $image['name'] . '-thumb' . self::getExtension($image['file_name']);
|
||||
|
||||
return "/storage/$id/conversions/$filename";
|
||||
@@ -102,6 +104,7 @@ class Medias
|
||||
return null;
|
||||
}
|
||||
$id = $image['id'];
|
||||
$image['name'] = str_replace(['#', '/', '\\', ' '], '-', $image['name']);
|
||||
$filename = $image['name'] . '-preview' . self::getExtension($image['file_name']);
|
||||
|
||||
return "/storage/$id/conversions/$filename";
|
||||
|
||||
Reference in New Issue
Block a user