正在显示
1 个修改的文件
包含
4 行增加
和
8 行删除
| @@ -142,14 +142,10 @@ class FileController | @@ -142,14 +142,10 @@ 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 | - //同步到大文件 | ||
| 148 | - $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'; | ||
| 150 | - shell_exec($cmd); | ||
| 151 | - } | ||
| 152 | - return true; | 145 | + //同步到大文件 |
| 146 | + $file_path = getFileUrl($this->path.'/'.$fileName,$this->cache['storage_type'] ?? 0); | ||
| 147 | + $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->path.'" https://v6-file.globalso.com/upload.php'; | ||
| 148 | + shell_exec($cmd); | ||
| 153 | } | 149 | } |
| 154 | 150 | ||
| 155 | /** | 151 | /** |
-
请 注册 或 登录 后发表评论