作者 lyh

gx

@@ -331,7 +331,7 @@ class ImageController extends Controller @@ -331,7 +331,7 @@ class ImageController extends Controller
331 } 331 }
332 $image_hash = $imageModel->read($param); 332 $image_hash = $imageModel->read($param);
333 if($image_hash !== false){ 333 if($image_hash !== false){
334 - $data[] = $this->responseData($image_hash['path']); 334 + $data[] = $this->responseData($image_hash['path'],$image_hash['name']);
335 continue; 335 continue;
336 } 336 }
337 $image_type = $file->getClientOriginalExtension(); 337 $image_type = $file->getClientOriginalExtension();
@@ -346,11 +346,9 @@ class ImageController extends Controller @@ -346,11 +346,9 @@ class ImageController extends Controller
346 $amazonS3Service->uploadFiles($file,$this->path,$fileName); 346 $amazonS3Service->uploadFiles($file,$this->path,$fileName);
347 } 347 }
348 //批量存储 348 //批量存储
349 - $rs = $this->saveMysql($imageModel,$file->getSize(),$image_type,$fileName,$hash,$this->upload_location,$file->getMimeType(),$name);  
350 - if($rs){  
351 - $this->synchronizationImage($fileName,$this->upload_location);  
352 - $data[] = $this->responseData($this->path.'/'.$fileName,$name);  
353 - } 349 + $this->saveMysql($imageModel,$file->getSize(),$image_type,$fileName,$hash,$this->upload_location,$file->getMimeType(),$name);
  350 + $this->synchronizationImage($fileName,$this->upload_location);
  351 + $data[] = $this->responseData($this->path.'/'.$fileName,$name);
354 } 352 }
355 $this->response('图片资源',Code::SUCCESS,$data); 353 $this->response('图片资源',Code::SUCCESS,$data);
356 } 354 }