改进第三方储存

This commit is contained in:
wispx
2018-12-18 11:36:03 +08:00
parent 59a5b3007a
commit 1f8b3dc337
5 changed files with 32 additions and 19 deletions
+7 -7
View File
@@ -21,12 +21,12 @@ return [
'name' => '腾讯云COS',
'class' => \strategy\driver\Cos::class
],
'qiniu' => [
'name' => '七牛云',
'class' => \strategy\driver\Qiniu::class
'kodo' => [
'name' => '七牛云KODO',
'class' => \strategy\driver\Kodo::class
],
'upyun' => [
'name' => '又拍云',
'class' => \strategy\driver\Upyun::class
'uss' => [
'name' => '又拍云USS',
'class' => \strategy\driver\Uss::class
],
];
];
@@ -20,7 +20,7 @@ use strategy\Driver;
* Class Qiniu
* @package strategy\driver
*/
class Qiniu implements Driver
class Kodo implements Driver
{
/**
* 当前储存策略参数
@@ -135,4 +135,4 @@ class Qiniu implements Driver
{
return 'Qiniu' . $this->error;
}
}
}
@@ -16,7 +16,7 @@ use strategy\Driver;
* Class Upyun
* @package strategy\driver
*/
class Upyun implements Driver
class Uss implements Driver
{
/**
* 当前储存策略参数
@@ -125,4 +125,4 @@ class Upyun implements Driver
{
return 'Upyun' . $this->error;
}
}
}
+8 -8
View File
@@ -71,14 +71,14 @@ INSERT INTO `lsky_config` (`id`, `key`, `type`, `input_type`, `name`, `title`, `
(30, 'cos', 'text', 'text', 'cos_secret_key', 'SecretKey', NULL, '', ''),
(31, 'cos', 'text', 'text', 'cos_region', '所属地域', NULL, '', ''),
(32, 'cos', 'text', 'text', 'cos_bucket', 'Bucket', '储存桶名称', '', ''),
(33, 'qiniu', 'text', 'text', 'qiniu_cdn_domain', 'CDN加速域名', NULL, '', ''),
(34, 'qiniu', 'text', 'text', 'qiniu_access_key', 'AccessKey', NULL, '', ''),
(35, 'qiniu', 'text', 'text', 'qiniu_secret_key', 'SecretKey', NULL, '', ''),
(36, 'qiniu', 'text', 'text', 'qiniu_bucket', 'Bucket', NULL, '', ''),
(37, 'upyun', 'text', 'text', 'upyun_cdn_domain', 'CDN加速域名', NULL, '', ''),
(38, 'upyun', 'text', 'text', 'upyun_operator_name', 'OperatorName', '操作员账号', '', ''),
(39, 'upyun', 'text', 'password', 'upyun_operator_pwd', 'OperatorPwd', '操作员密码', '', ''),
(40, 'upyun', 'text', 'text', 'upyun_service_name', 'ServiceName', '云储存服务名称', '', ''),
(33, 'kodo', 'text', 'text', 'kodo_cdn_domain', 'CDN加速域名', NULL, '', ''),
(34, 'kodo', 'text', 'text', 'kodo_access_key', 'AccessKey', NULL, '', ''),
(35, 'kodo', 'text', 'text', 'kodo_secret_key', 'SecretKey', NULL, '', ''),
(36, 'kodo', 'text', 'text', 'kodo_bucket', 'Bucket', NULL, '', ''),
(37, 'uss', 'text', 'text', 'uss_cdn_domain', 'CDN加速域名', NULL, '', ''),
(38, 'uss', 'text', 'text', 'uss_operator_name', 'OperatorName', '操作员账号', '', ''),
(39, 'uss', 'text', 'password', 'uss_operator_pwd', 'OperatorPwd', '操作员密码', '', ''),
(40, 'uss', 'text', 'text', 'uss_service_name', 'ServiceName', '云储存服务名称', '', ''),
(41, '', 'text', 'text', 'system_version', '系统版本', NULL, '1.3.3', ''),
+13
View File
@@ -16,3 +16,16 @@ INSERT IGNORE INTO `lsky_config` (`id`, `key`, `type`, `input_type`, `name`, `ti
-- v1.3.3
UPDATE `lsky_config` SET `value` = '1.3.3' WHERE `lsky_config`.`name` = 'system_version';
-- v1.4.0
UPDATE `lsky_config` SET `value` = '1.4.0' WHERE `lsky_config`.`name` = 'system_version';
UPDATE `lsky_config` SET `key` = 'uss', `name` = 'uss_cdn_domain' WHERE `lsky_config`.`name` = 'upyun_cdn_domain';
UPDATE `lsky_config` SET `key` = 'uss', `name` = 'uss_operator_name' WHERE `lsky_config`.`name` = 'upyun_operator_name';
UPDATE `lsky_config` SET `key` = 'uss', `name` = 'uss_operator_pwd' WHERE `lsky_config`.`name` = 'upyun_operator_pwd';
UPDATE `lsky_config` SET `key` = 'uss', `name` = 'uss_service_name' WHERE `lsky_config`.`name` = 'upyun_service_name';
UPDATE `lsky_config` SET `key` = 'kodo', `name` = 'kodo_cdn_domain' WHERE `lsky_config`.`name` = 'qiniu_cdn_domain';
UPDATE `lsky_config` SET `key` = 'kodo', `name` = 'kodo_access_key' WHERE `lsky_config`.`name` = 'qiniu_access_key';
UPDATE `lsky_config` SET `key` = 'kodo', `name` = 'kodo_secret_key' WHERE `lsky_config`.`name` = 'qiniu_secret_key';
UPDATE `lsky_config` SET `key` = 'kodo', `name` = 'kodo_bucket' WHERE `lsky_config`.`name` = 'qiniu_bucket';
UPDATE `lsky_config` SET `value` = 'kodo' WHERE `lsky_config`.`value` = 'qiniu';
UPDATE `lsky_config` SET `value` = 'uss' WHERE `lsky_config`.`value` = 'upyun';