|
...
|
...
|
@@ -331,7 +331,7 @@ class ImageController extends Controller |
|
|
|
}
|
|
|
|
$image_hash = $imageModel->read($param);
|
|
|
|
if($image_hash !== false){
|
|
|
|
$data[] = $this->responseData($image_hash['path']);
|
|
|
|
$data[] = $this->responseData($image_hash['path'],$image_hash['name']);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$image_type = $file->getClientOriginalExtension();
|
|
...
|
...
|
@@ -346,11 +346,9 @@ class ImageController extends Controller |
|
|
|
$amazonS3Service->uploadFiles($file,$this->path,$fileName);
|
|
|
|
}
|
|
|
|
//批量存储
|
|
|
|
$rs = $this->saveMysql($imageModel,$file->getSize(),$image_type,$fileName,$hash,$this->upload_location,$file->getMimeType(),$name);
|
|
|
|
if($rs){
|
|
|
|
$this->synchronizationImage($fileName,$this->upload_location);
|
|
|
|
$data[] = $this->responseData($this->path.'/'.$fileName,$name);
|
|
|
|
}
|
|
|
|
$this->saveMysql($imageModel,$file->getSize(),$image_type,$fileName,$hash,$this->upload_location,$file->getMimeType(),$name);
|
|
|
|
$this->synchronizationImage($fileName,$this->upload_location);
|
|
|
|
$data[] = $this->responseData($this->path.'/'.$fileName,$name);
|
|
|
|
}
|
|
|
|
$this->response('图片资源',Code::SUCCESS,$data);
|
|
|
|
}
|
...
|
...
|
|