dever 4 yıl önce
ebeveyn
işleme
a5ffc9df20
2 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 3 2
      lib/Store/Oss.php
  2. 1 1
      lib/Store/Qiniu.php

+ 3 - 2
lib/Store/Oss.php

@@ -21,6 +21,7 @@ class Oss extends Core implements Config
         $endpoint = "http://oss-cn-".$config['region_id'].".aliyuncs.com";
         $bucket = $this->config['bucket'];
         $this->host = $config['host'];
+        $this->data['host']  = $this->host;
         list($type, $token, $domain, $bucket) = Dever::load('upload/lib/view/oss')->token($config, $this->config);
         $data = explode('||', $token);
         if ($data[0]) {
@@ -190,7 +191,7 @@ class Oss extends Core implements Config
             //?imageView2/2/w/360/h/270/format/png/q/75|imageslim
             //?x-oss-process=image/resize,q_50
            // $dest = $source . '?imageView2/2/w/'.$config['width'].'/h/'.$config['height'];
-            $dest = $source . '?x-oss-process=image/resize,m_lfit,w_'.$config['width'].',h_' . $config['height'];
+            $dest = $this->data['host'] . $source . '?x-oss-process=image/resize,m_lfit,w_'.$config['width'].',h_' . $config['height'];
 
             if (isset($config['compress']) && $config['compress'] > 0) {
                 $dest .= ',q_' . $config['compress'];
@@ -214,7 +215,7 @@ class Oss extends Core implements Config
                 $source = $this->output['file'];
             }
 
-            $dest = $source . '?x-oss-process=image/resize,fill,w_'.$config['width'].',h_' . $config['height'];
+            $dest = $this->data['host'] . $source . '?x-oss-process=image/resize,fill,w_'.$config['width'].',h_' . $config['height'];
         }
         return $dest;
     }

+ 1 - 1
lib/Store/Qiniu.php

@@ -185,7 +185,7 @@ class Qiniu extends Core implements Config
             }
 
             //?imageView2/2/w/360/h/270/format/png/q/75|imageslim
-            $dest = $source . '?imageView2/2/w/'.$config['width'].'/h/'.$config['height'];
+            $dest = $this->data['host'] . $source . '?imageView2/2/w/'.$config['width'].'/h/'.$config['height'];
 
             if (isset($config['compress']) && $config['compress'] > 0) {
                 $dest .= '/q/' . $config['compress'];