Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -170,9 +170,9 @@ class FileController | @@ -170,9 +170,9 @@ class FileController | ||
| 170 | $hash = hash_file('md5', $files->getPathname()); | 170 | $hash = hash_file('md5', $files->getPathname()); |
| 171 | //查看文件是否存在 | 171 | //查看文件是否存在 |
| 172 | $fileModel = new File(); | 172 | $fileModel = new File(); |
| 173 | - $file_hash = $fileModel->read(['hash'=>$hash,'file_link'=>$this->getFileUrl($fileModel,$hash)]); | 173 | + $file_hash = $fileModel->read(['hash'=>$hash]); |
| 174 | if($file_hash !== false){ | 174 | if($file_hash !== false){ |
| 175 | - return $this->response('资源',Code::SUCCESS,['file'=>$hash]); | 175 | + return $this->response('资源',Code::SUCCESS,['file'=>$hash,'file_link'=>$this->getFileUrl($fileModel,$hash)]); |
| 176 | } | 176 | } |
| 177 | $url = $this->config['root'].$this->path; | 177 | $url = $this->config['root'].$this->path; |
| 178 | $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension(); | 178 | $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension(); |
-
请 注册 或 登录 后发表评论