Chevereto 接入 minio 存储

Chevereto 版本:3.20.20

需要修改 Chevereto 源码,共 2 个位置:

  1. app/app/lib/classes/class.storage.php
  2. app/lib/classes/class.storage.php

在文件内搜索 S3Client::factory 在参数内加入以下设置即可:

'use_path_style_endpoint' => true,
'signatureVersion' => 'v2'

示例(加粗位置)

case 's3compatible':
    $factoria = [
        'version' => '2006-03-01',
        'region' => $storage['region'],
        'command.params' => ['PathStyle' => true],
        'credentials' => [
            'key' => $storage['key'],
            'secret' => $storage['secret'],
        ],
        'http' => [
            'verify' => CaBundle::getBundledCaBundlePath(),
        ],
        'use_path_style_endpoint' => true,
        'signatureVersion' => 'v2'
    ];
    if ($api_type == 's3compatible') {
        $factoria['endpoint'] = $storage['server'];
    }

    return \Aws\S3\S3Client::factory($factoria);

Chevereto 配置示例

注意事项

  1. 需要把存储桶设置为 Public
  2. URL 选项可以自己在 Minio 服务器那边再反代一次,不影响上传

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据