|
@@ -175,9 +175,9 @@ class View
|
|
|
}
|
|
|
|
|
|
# 根据配置生成缩略图 暂时支持缩略图
|
|
|
- public function get()
|
|
|
+ public function get($file = '')
|
|
|
{
|
|
|
- $file = Dever::input('file');
|
|
|
+ $file = Dever::input('file', $file);
|
|
|
$array = $this->getFile($file);
|
|
|
$source = $array[0];
|
|
|
$type = $array[1];
|
|
@@ -186,6 +186,7 @@ class View
|
|
|
if ($id > 0) {
|
|
|
$host = Dever::config('host')->uploadRes;
|
|
|
$root = Dever::data() . 'upload/';
|
|
|
+ $source = Dever::pic($source);
|
|
|
$dest = str_replace(array('{uploadRes}', $host), $root, $file);
|
|
|
$path = str_replace(array('{uploadRes}', $host), '', $file);
|
|
|
if (strstr($source, $host)) {
|
|
@@ -203,7 +204,7 @@ class View
|
|
|
$file = str_replace($root, $host, $dest);
|
|
|
}
|
|
|
|
|
|
- if (!strstr($dest, 'http://') && !is_file($dest)) {
|
|
|
+ if (!strstr($dest, 'http://')) {
|
|
|
$temp = explode('/', $path);
|
|
|
$key = $temp[0];
|
|
|
$image['file'] = false;
|