This commit is contained in:
Wisp X 2022-03-22 14:17:21 +08:00
parent 10921b34fc
commit 769eb4bbd5
3 changed files with 9 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class StrategyRequest extends FormRequest
{
$checkUrl = function ($attribute, $value, $fail) {
if ($this->input('key') == StrategyKey::Local) {
$folders = [env('THUMBNAIL_PATH', 'thumbnails'), 'fonts', 'css', 'js'];
$folders = [config('app.thumbnail_path'), 'fonts', 'css', 'js'];
$symlink = Strategy::getRootPath($value);
if (! $symlink) {
return $fail('访问域名缺少根路径');

View File

@ -235,7 +235,7 @@ class Image extends Model
public function getThumbnailPathname(): string
{
return trim(env('THUMBNAIL_PATH', 'thumbnails'), '/')."/{$this->md5}.png";
return trim(config('app.thumbnail_path'), '/')."/{$this->md5}.png";
}
private function generateKey($length = 6): string

View File

@ -194,4 +194,11 @@ return [
// ...
])->toArray(),
/*
|--------------------------------------------------------------------------
| Lsky configs
|--------------------------------------------------------------------------
*/
'thumbnail_path' => env('THUMBNAIL_PATH', 'thumbnails')
];