正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -85,8 +85,6 @@ class SyncFile extends Command | @@ -85,8 +85,6 @@ class SyncFile extends Command | ||
| 85 | */ | 85 | */ |
| 86 | public function synchronizationFile($path_name){ | 86 | public function synchronizationFile($path_name){ |
| 87 | //同步到大文件 | 87 | //同步到大文件 |
| 88 | - $file_path = config('filesystems.disks.cos')['cdn1'].$path_name; | ||
| 89 | - $directoryPath = pathinfo($path_name, PATHINFO_DIRNAME); | ||
| 90 | $cmd = 'curl -k -F "file_path='.$path_name.'" -F "save_path=/www/wwwroot/cos'.$path_name.'" https://v6-file.globalso.com/upload.php'; | 88 | $cmd = 'curl -k -F "file_path='.$path_name.'" -F "save_path=/www/wwwroot/cos'.$path_name.'" https://v6-file.globalso.com/upload.php'; |
| 91 | return shell_exec($cmd); | 89 | return shell_exec($cmd); |
| 92 | } | 90 | } |
| @@ -96,7 +94,7 @@ class SyncFile extends Command | @@ -96,7 +94,7 @@ class SyncFile extends Command | ||
| 96 | //同步到大文件 | 94 | //同步到大文件 |
| 97 | $file_path = config('filesystems.disks.s3')['cdn'].$path_name; | 95 | $file_path = config('filesystems.disks.s3')['cdn'].$path_name; |
| 98 | $directoryPath = pathinfo($path_name, PATHINFO_DIRNAME); | 96 | $directoryPath = pathinfo($path_name, PATHINFO_DIRNAME); |
| 99 | - $cmd = 'curl -k -F "file_path='.$path_name.'" -F "save_path=/www/wwwroot/cos'.$path_name.'" https://v6-file.globalso.com/upload.php'; | 97 | + $cmd = 'curl -k -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php'; |
| 100 | return shell_exec($cmd); | 98 | return shell_exec($cmd); |
| 101 | } | 99 | } |
| 102 | } | 100 | } |
-
请 注册 或 登录 后发表评论