上海柏锐网络科技有限公司是一家技术型服务企业.可提供专业的技术外包服务,定制OA,ERP,电商系统,H5网站,天猫淘宝H5,欢迎前来咨询
composer require brayun/yii2-upload
return [
//...
'components' => [
//...
'upload' => [
'class' => 'brayun\flysystem\OssFilesystem',
'ossServer' => 'oss-cn-beijing.aliyuncs.com',
'ossServerInternal' => 'oss-cn-shanghai-internal.aliyuncs.com',
'accessKeyId' => 'your-accessKeyId',
'accessKeySecret' => 'your-accessKeySecret',
'bucket' => 'your-bucket'
// 'internal' => false, // 默认外网, true内网
],
],
];