dever 7 years ago
parent
commit
1f862932c8
2 changed files with 7 additions and 0 deletions
  1. 1 0
      src/Store/Local.php
  2. 6 0
      src/View.php

+ 1 - 0
src/Store/Local.php

@@ -95,6 +95,7 @@ class Local extends Core implements Config
 	private function img()
 	{
 		$this->img = isset($this->img) ? $this->img : new Img();
+		$this->img->setType('im');
 
 		return $this->img;
 	}

+ 6 - 0
src/View.php

@@ -24,6 +24,12 @@ class View
             $host = Dever::config('host')->uploadRes;
             $root = Dever::data() . 'upload/';
             $dest = str_replace($host, $root, $file);
+            if (strstr($source, $host)) {
+                $source = $root . str_replace($host, '', $source);
+                if (!is_file($source)) {
+                    $source = $array[0];
+                }
+            }
 
             if (!strstr($dest, 'http://') && !is_file($dest)) {
                 $handle = new Handle();