正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -130,7 +130,7 @@ class FileController | @@ -130,7 +130,7 @@ class FileController | ||
| 130 | $amazonS3Service->uploadFiles($files,$this->path,$fileName); | 130 | $amazonS3Service->uploadFiles($files,$this->path,$fileName); |
| 131 | } | 131 | } |
| 132 | $this->saveMysql($fileModel,$files->getSize(),$files->getClientOriginalExtension(),$fileName,$hash,$this->upload_location,$files->getMimeType(),$name); | 132 | $this->saveMysql($fileModel,$files->getSize(),$files->getClientOriginalExtension(),$fileName,$hash,$this->upload_location,$files->getMimeType(),$name); |
| 133 | - $this->synchronizationFile($files->getClientOriginalExtension(),$fileName); | 133 | + $this->synchronizationFile($fileName); |
| 134 | $this->response('资源',Code::SUCCESS,$this->responseData($this->path.'/'.$fileName, $name)); | 134 | $this->response('资源',Code::SUCCESS,$this->responseData($this->path.'/'.$fileName, $name)); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| @@ -141,7 +141,7 @@ class FileController | @@ -141,7 +141,7 @@ class FileController | ||
| 141 | * @method :post | 141 | * @method :post |
| 142 | * @time :2024/4/8 11:10 | 142 | * @time :2024/4/8 11:10 |
| 143 | */ | 143 | */ |
| 144 | - public function synchronizationFile($file_type,$fileName){ | 144 | + public function synchronizationFile($fileName){ |
| 145 | //同步到大文件 | 145 | //同步到大文件 |
| 146 | $file_path = config('filesystems.disks.cos')['cdn1'].$this->path.'/'.$fileName; | 146 | $file_path = config('filesystems.disks.cos')['cdn1'].$this->path.'/'.$fileName; |
| 147 | $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->path.'" https://v6-file.globalso.com/upload.php'; | 147 | $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->path.'" https://v6-file.globalso.com/upload.php'; |
| @@ -262,7 +262,7 @@ class FileController | @@ -262,7 +262,7 @@ class FileController | ||
| 262 | $mime = $file->getMimeType(); | 262 | $mime = $file->getMimeType(); |
| 263 | $this->saveMysql($fileModel,$size,$file_type,$fileName,$hash,$this->upload_location,$mime,$name); | 263 | $this->saveMysql($fileModel,$size,$file_type,$fileName,$hash,$this->upload_location,$mime,$name); |
| 264 | $data[] = $this->responseData($this->path.'/'.$fileName, $name); | 264 | $data[] = $this->responseData($this->path.'/'.$fileName, $name); |
| 265 | - $this->synchronizationFile($file_type,$fileName); | 265 | + $this->synchronizationFile($fileName); |
| 266 | } | 266 | } |
| 267 | $this->response('资源',Code::SUCCESS,$data); | 267 | $this->response('资源',Code::SUCCESS,$data); |
| 268 | } | 268 | } |
-
请 注册 或 登录 后发表评论