|
@@ -27,14 +27,11 @@ class Upload extends Base
|
|
|
protected $key;
|
|
|
protected $host;
|
|
|
|
|
|
-
|
|
|
public function initialize(){
|
|
|
- $this->id = config('app.ali_set.Key');
|
|
|
- $this->key = config('app.ali_set.secret');
|
|
|
- $this->host = config('app.ali_set.host');
|
|
|
+ $this->id = sysconf('storage_oss_keyid');
|
|
|
+ $this->key = sysconf('storage_oss_secret');
|
|
|
+ $this->host = "https://".sysconf('storage_oss_domain');
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
public function upload()
|
|
|
{
|
|
|
if (!($file = $this->getUploadFile()) || empty($file)) {
|
|
@@ -58,7 +55,6 @@ class Upload extends Base
|
|
|
$this->error('文件处理失败,请稍候再试!');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
private function getUploadFile()
|
|
|
{
|
|
|
try {
|
|
@@ -67,8 +63,6 @@ class Upload extends Base
|
|
|
$this->error(lang($e->getMessage()));
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
private function getUploadType()
|
|
|
{
|
|
|
$this->uptype = input('uptype');
|