|
...
|
...
|
@@ -19,7 +19,7 @@ class SyncVideo extends Command |
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $signature = 'sync_video {file}';
|
|
|
|
protected $signature = 'sync_video {path}';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
...
|
...
|
@@ -29,8 +29,9 @@ class SyncVideo extends Command |
|
|
|
protected $description = '同步图片与文件';
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
$this->param['path'] = $this->argument('file');
|
|
|
|
$file_path = $this->getUrl($this->param['path'], 0,0);
|
|
|
|
$this->param['path'] = $this->argument('path');
|
|
|
|
$this->param['name'] = basename($this->param['path']);
|
|
|
|
$file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,$this->param['location']);
|
|
|
|
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php';
|
|
|
|
echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL;
|
|
|
|
$code = shell_exec($cmd);
|
...
|
...
|
|