正在显示
1 个修改的文件
包含
0 行增加
和
4 行删除
| @@ -142,15 +142,11 @@ class FileController | @@ -142,15 +142,11 @@ class FileController | ||
| 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($file_type,$fileName){ |
| 145 | - $fileTypeArr = ['zip', 'pdf', 'mp4', 'doc', 'docx', 'm4v', 'xlsx']; | ||
| 146 | - if(in_array($file_type,$fileTypeArr)){ | ||
| 147 | //同步到大文件 | 145 | //同步到大文件 |
| 148 | $file_path = getFileUrl($this->path.'/'.$fileName,$this->cache['storage_type'] ?? 0); | 146 | $file_path = getFileUrl($this->path.'/'.$fileName,$this->cache['storage_type'] ?? 0); |
| 149 | $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'; |
| 150 | shell_exec($cmd); | 148 | shell_exec($cmd); |
| 151 | } | 149 | } |
| 152 | - return true; | ||
| 153 | - } | ||
| 154 | 150 | ||
| 155 | /** | 151 | /** |
| 156 | * 接口上传单文件 | 152 | * 接口上传单文件 |
-
请 注册 或 登录 后发表评论