|
@@ -424,8 +424,14 @@ class Core
|
|
|
$info = Dever::db('upload/file')->one(array('name' => $this->name, 'upload' => $this->data['key']));
|
|
|
if ($info && $info['file'] && strstr($info['file'], $this->name)) {
|
|
|
# 如果存在,直接使用旧文件
|
|
|
- $temp = explode($this->name, $info['file']);
|
|
|
- $this->path = $temp[0];
|
|
|
+ if (strstr($info['file'], 'http')) {
|
|
|
+ $config = parse_url($info['file']);
|
|
|
+ } else {
|
|
|
+ $config['path'] = $info['file'];
|
|
|
+ }
|
|
|
+
|
|
|
+ $temp = explode($this->name, $config['path']);
|
|
|
+ $this->path = ltrim($temp[0], '/');
|
|
|
}
|
|
|
}
|
|
|
|