作者 lyh

gx

@@ -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 * 接口上传单文件