M1: 数据模型 + sablog:import 脚本(MySQL 8 验证通过,不迁移 trackback 等过时功能)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
class MediaDisk
|
||||
{
|
||||
/**
|
||||
* 实际生效的附件磁盘:
|
||||
* 默认走 S3(uploads);未配置 S3 密钥时回退本地 public,保证开发环境可用。
|
||||
*/
|
||||
public static function name(): string
|
||||
{
|
||||
$configured = config('blog.attachments_disk', 'uploads');
|
||||
|
||||
if ($configured === 'uploads' && empty(config('media.bucket'))) {
|
||||
return 'public';
|
||||
}
|
||||
|
||||
return $configured;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user