rabin 3 years ago
parent
commit
83d5dd8510
3 changed files with 7 additions and 5 deletions
  1. 2 2
      lib/Store/Core.php
  2. 4 0
      lib/Store/Qiniu.php
  3. 1 3
      src/View.php

+ 2 - 2
lib/Store/Core.php

@@ -228,13 +228,13 @@ class Core
 		        $this->base64 = true;
 			} elseif (strstr($this->data['file'], 'content,')) {
 				$file = str_replace('content,', '', $this->data['file']);
-				$this->data['cropper'] = true;
+				$this->data['content'] = true;
 			} else {
 				$name = urldecode($this->data['file']);
 			}
 
 			$this->data['file'] = array();
-			if ((!isset($this->data['cropper'])) && strstr($name, 'http') && !$this->yun) {
+			if (isset($this->data['content']) || (!isset($this->data['cropper']) && strstr($name, 'http') && !$this->yun)) {
 				$this->base64 = false;
 
 				$this->root();

+ 4 - 0
lib/Store/Qiniu.php

@@ -229,6 +229,8 @@ class Qiniu extends Core implements Config
             }
 
             $dest .= '|imageslim';
+
+            $this->output['url'] = $dest;
         }
         return $dest;
     }
@@ -286,6 +288,8 @@ class Qiniu extends Core implements Config
             $dest = $source . $prefix . '/crop/!'.$config['width'].'x'.$config['height'].'a'.$x.'a' . $y;
 
             $dest .= '|imageslim';
+
+            $this->output['url'] = $dest;
         }
         return $dest;
     }

+ 1 - 3
src/View.php

@@ -440,9 +440,7 @@ class View
                 $file = $handle->$method($id, $source, $dest, $path);
             } elseif (!$local && $handle->yun) {
                 $yun = $handle->yun->getData();
-                if (!strstr($source, 'http')) {
-                    $file = $yun['host'] . $source;
-                }
+                $file = $yun['host'] . $source;
             }
         }