作者 lyh

gx

... ... @@ -110,7 +110,7 @@ class FileController
* @time :2023/6/17 16:32
*/
public function single(&$files){
$hash = hash_file('md5', $files->getPathname());
$hash = hash_file('sha256', $files->getPathname());
$name = $files->getClientOriginalName();
//查看文件是否存在
$fileModel = new File();
... ... @@ -277,7 +277,7 @@ class FileController
foreach ($files as $file) {
$fileModel = new File();
$name = $file->getClientOriginalName();
$hash = hash_file('md5', $file->getPathname());
$hash = hash_file('sha256', $file->getPathname());
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
$param['project_id'] = $this->cache['project_id'];
... ...
... ... @@ -184,7 +184,7 @@ class ImageController extends Controller
* @time :2023/6/17 16:30
*/
public function single(&$files){
$hash = hash_file('md5', $files->getPathname());
$hash = hash_file('sha256', $files->getPathname());
$name = $files->getClientOriginalName();
//查看文件是否存在
$imageModel = new ImageModel();
... ... @@ -326,7 +326,7 @@ class ImageController extends Controller
$data = [];
foreach ($files as $file) {
$imageModel = new ImageModel();
$hash = hash_file('md5', $file->getPathname());
$hash = hash_file('sha256', $file->getPathname());
$name = $file->getClientOriginalName();
//查看图片是否已上传
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
... ...