|
@@ -110,7 +110,7 @@ class FileController |
|
@@ -110,7 +110,7 @@ class FileController |
|
110
|
* @time :2023/6/17 16:32
|
110
|
* @time :2023/6/17 16:32
|
|
111
|
*/
|
111
|
*/
|
|
112
|
public function single(&$files){
|
112
|
public function single(&$files){
|
|
113
|
- $hash = hash_file('md5', $files->getPathname());
|
113
|
+ $hash = hash_file('sha256', $files->getPathname());
|
|
114
|
$name = $files->getClientOriginalName();
|
114
|
$name = $files->getClientOriginalName();
|
|
115
|
//查看文件是否存在
|
115
|
//查看文件是否存在
|
|
116
|
$fileModel = new File();
|
116
|
$fileModel = new File();
|
|
@@ -277,7 +277,7 @@ class FileController |
|
@@ -277,7 +277,7 @@ class FileController |
|
277
|
foreach ($files as $file) {
|
277
|
foreach ($files as $file) {
|
|
278
|
$fileModel = new File();
|
278
|
$fileModel = new File();
|
|
279
|
$name = $file->getClientOriginalName();
|
279
|
$name = $file->getClientOriginalName();
|
|
280
|
- $hash = hash_file('md5', $file->getPathname());
|
280
|
+ $hash = hash_file('sha256', $file->getPathname());
|
|
281
|
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
|
281
|
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
|
|
282
|
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
|
282
|
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
|
|
283
|
$param['project_id'] = $this->cache['project_id'];
|
283
|
$param['project_id'] = $this->cache['project_id'];
|