|
@@ -328,19 +328,23 @@ class View
|
|
|
$file = str_replace($root, $host, $dest);
|
|
|
}
|
|
|
|
|
|
- if (!strstr($dest, 'http://')) {
|
|
|
- $temp = explode('/', $path);
|
|
|
- $key = $temp[0];
|
|
|
- $image['file'] = false;
|
|
|
- $image['key'] = $key;
|
|
|
- $handle = new Handle($image);
|
|
|
- $method = 'handle_' . $type;
|
|
|
- $file = $handle->$method($id, $source, $dest, $path);
|
|
|
-
|
|
|
- echo $file;die;
|
|
|
+ if (is_file($dest)) {
|
|
|
+ $file = $dest;
|
|
|
+ } else {
|
|
|
+ if (!strstr($dest, 'http://')) {
|
|
|
+ $temp = explode('/', $path);
|
|
|
+ $key = $temp[0];
|
|
|
+ $image['file'] = false;
|
|
|
+ $image['key'] = $key;
|
|
|
+ $handle = new Handle($image);
|
|
|
+ $method = 'handle_' . $type;
|
|
|
+ $file = $handle->$method($id, $source, $dest, $path);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ $file = Dever::uploadRes($file);
|
|
|
+
|
|
|
return $file;
|
|
|
}
|
|
|
|