作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

... ... @@ -311,13 +311,4 @@ class LoginController extends BaseController
}
return $data;
}
public function ceshi(){
//同步到大文件
$path = '/upload/m/video/2023-08';
$fileName = '64e81b9b80b1331590.mp4';
$file_path = config('filesystems.disks.cos')['cdn1'].$path.'/'.$fileName;
$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);
}
}
... ...
... ... @@ -3,6 +3,7 @@
namespace App\Http\Controllers\File;
use App\Enums\Common\Code;
use App\Models\File\ErrorFile;
use App\Models\File\File;
use App\Models\Project\Project;
use App\Services\AmazonS3Service;
... ... @@ -145,7 +146,12 @@ class FileController
//同步到大文件
$file_path = config('filesystems.disks.cos')['cdn1'].$this->path.'/'.$fileName;
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->path.'" https://v6-file.globalso.com/upload.php';
shell_exec($cmd);
$code = shell_exec($cmd);
if(200 != (int)$code){
$errorFileModel = new ErrorFile();
$errorFileModel->add(['path'=>$this->path.'/'.$fileName]);
}
return true;
}
/**
... ...
... ... @@ -5,6 +5,7 @@ namespace App\Http\Controllers\File;
use App\Enums\Common\Code;
use App\Http\Controllers\Controller;
use App\Http\Controllers\type;
use App\Models\File\ErrorFile;
use App\Models\File\Image as ImageModel;
use App\Models\Project\Project;
use App\Services\AmazonS3Service;
... ... @@ -225,7 +226,12 @@ class ImageController extends Controller
//同步到大文件
$file_path = getImageUrl($this->path.'/'.$fileName,$this->cache['storage_type'] ?? 0);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->path.'" https://v6-file.globalso.com/upload.php';
shell_exec($cmd);
$code = shell_exec($cmd);
if(200 != (int)$code){
$errorFileModel = new ErrorFile();
$errorFileModel->add(['path'=>$this->path.'/'.$fileName]);
}
return true;
}
/**
... ...
<?php
/**
* @remark :
* @name :ErrorFile.php
* @author :lyh
* @method :post
* @time :2024/4/16 17:00
*/
namespace App\Models\File;
use App\Models\Base;
class ErrorFile extends Base
{
protected $table = 'gl_error_file';
}
... ...