Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
| @@ -67,7 +67,7 @@ class FileController | @@ -67,7 +67,7 @@ class FileController | ||
| 67 | if ($info === false) { | 67 | if ($info === false) { |
| 68 | $this->response('指定文件不存在!', Code::USER_ERROR); | 68 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 69 | } | 69 | } |
| 70 | - $path = $this->config['url'].'/'.$info['path']; | 70 | + $path = $this->config['root'].'/'.$info['path']; |
| 71 | if (!is_file($path)) { | 71 | if (!is_file($path)) { |
| 72 | $this->response('指定文件已被系统删除!', Code::USER_ERROR); | 72 | $this->response('指定文件已被系统删除!', Code::USER_ERROR); |
| 73 | } | 73 | } |
| @@ -174,6 +174,7 @@ class FileController | @@ -174,6 +174,7 @@ class FileController | ||
| 174 | 'size' => $res->getSize(), | 174 | 'size' => $res->getSize(), |
| 175 | 'hash' => $hash, | 175 | 'hash' => $hash, |
| 176 | 'type'=>$files->getClientOriginalExtension(), | 176 | 'type'=>$files->getClientOriginalExtension(), |
| 177 | + 'refer'=>$this->param['refer'] | ||
| 177 | ]; | 178 | ]; |
| 178 | $rs = $fileModel->add($data); | 179 | $rs = $fileModel->add($data); |
| 179 | if ($rs === false) { | 180 | if ($rs === false) { |
| @@ -204,7 +205,7 @@ class FileController | @@ -204,7 +205,7 @@ class FileController | ||
| 204 | $data[] = $hash; | 205 | $data[] = $hash; |
| 205 | continue; | 206 | continue; |
| 206 | } | 207 | } |
| 207 | - $url = $this->config['url'].'/'.$this->path; | 208 | + $url = $this->config['root'].'/'.$this->path; |
| 208 | $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension(); | 209 | $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension(); |
| 209 | $res = $file->move($url,$fileName); | 210 | $res = $file->move($url,$fileName); |
| 210 | if ($res === false) { | 211 | if ($res === false) { |
| @@ -216,6 +217,7 @@ class FileController | @@ -216,6 +217,7 @@ class FileController | ||
| 216 | 'size' => $res->getSize(), | 217 | 'size' => $res->getSize(), |
| 217 | 'hash' => $hash, | 218 | 'hash' => $hash, |
| 218 | 'type'=>$files->getClientOriginalExtension(), | 219 | 'type'=>$files->getClientOriginalExtension(), |
| 220 | + 'refer'=>$this->param['refer'] | ||
| 219 | ]; | 221 | ]; |
| 220 | $data[] = $hash; | 222 | $data[] = $hash; |
| 221 | } | 223 | } |
-
请 注册 或 登录 后发表评论