mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-07 03:16:46 +08:00
改进
This commit is contained in:
parent
10921b34fc
commit
769eb4bbd5
@ -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('访问域名缺少根路径');
|
||||
|
@ -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
|
||||
|
@ -194,4 +194,11 @@ return [
|
||||
// ...
|
||||
])->toArray(),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Lsky configs
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'thumbnail_path' => env('THUMBNAIL_PATH', 'thumbnails')
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user