dever 7 years ago
parent
commit
4aa7af2a10
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/Store/Local.php
  2. 1 1
      src/View.php

+ 2 - 2
src/Store/Local.php

@@ -138,7 +138,7 @@ class Local extends Core implements Config
 		}
 
 		$this->img()->setType('im');
-		$this->img()->compress($source, 20, $dest);
+		$this->img()->compress($source, $num, $dest);
 	}
 	
 	/**
@@ -171,7 +171,7 @@ class Local extends Core implements Config
             # 同时进行压缩
             if (isset($config['compress']) && $config['compress'] > 0) {
 				$this->img()->setType('im');
-				$this->img()->compress($dest, 20, $dest);
+				$this->img()->compress($dest, $config['compress'], $dest);
             }
 		}
 	}

+ 1 - 1
src/View.php

@@ -23,7 +23,7 @@ class View
         if ($id > 0) {
             $host = Dever::config('host')->uploadRes;
             $root = Dever::data() . 'upload/';
-            $dest = str_replace($host, $root, $file);
+            $dest = str_replace(array('{uploadRes}', $host), $root, $file);
             if (strstr($source, $host)) {
                 $source = $root . str_replace($host, '', $source);
                 if (!is_file($source)) {