|
...
|
...
|
@@ -147,7 +147,14 @@ class FileController |
|
|
|
*/
|
|
|
|
public function synchronizationFile($fileName,$location){
|
|
|
|
//同步到大文件
|
|
|
|
$file_path = $this->getUrl($this->path.'/'.$fileName, 0,$location);
|
|
|
|
$headers = get_headers($file_path, 1);
|
|
|
|
if (strpos($headers[0], '200') === false) {
|
|
|
|
$errorFileModel = new ErrorFile();
|
|
|
|
$errorFileModel->add(['path'=>$this->param['path'].'/'.$this->param['name']]);
|
|
|
|
}else{
|
|
|
|
SyncImageFileJob::dispatch(['path'=>$this->path,'name'=>$fileName,'location'=>$location]);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|