|
...
|
...
|
@@ -317,19 +317,7 @@ class LoginController extends BaseController |
|
|
|
$path = '/upload/m/video/2023-08';
|
|
|
|
$fileName = '64e81b9b80b1331590.mp4';
|
|
|
|
$file_path = config('filesystems.disks.cos')['cdn1'].$path.'/'.$fileName;
|
|
|
|
$param = [
|
|
|
|
'file_path'=>$file_path,
|
|
|
|
'save_path'=>'/www/wwwroot/cos'.$path
|
|
|
|
];
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), 'ceshi' . PHP_EOL, FILE_APPEND);
|
|
|
|
$url = 'https://v6-file.globalso.com/upload.php';
|
|
|
|
$rs = http_post($url,$param,['charset=utf-8'],false);
|
|
|
|
if(200 == (int)$rs){
|
|
|
|
return ['code'=>200];
|
|
|
|
$this->response('success',Code::SUCCESS,$rs);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
// $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$path.'" https://v6-file.globalso.com/upload.php';
|
|
|
|
// return shell_exec($cmd);
|
|
|
|
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$path.'" https://v6-file.globalso.com/upload.php';
|
|
|
|
echo shell_exec($cmd);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|