|
@@ -32,7 +32,7 @@ class CopyImageFileListener implements ShouldQueue |
|
@@ -32,7 +32,7 @@ class CopyImageFileListener implements ShouldQueue |
|
32
|
if(!empty($imageList)){
|
32
|
if(!empty($imageList)){
|
|
33
|
$amazonS3Service = new AmazonS3Service();
|
33
|
$amazonS3Service = new AmazonS3Service();
|
|
34
|
foreach ($imageList as $k => $v){
|
34
|
foreach ($imageList as $k => $v){
|
|
35
|
- $rs = $amazonS3Service->syncImageFiles(getImageUrl($v['path']));
|
35
|
+ $rs = $amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']);
|
|
36
|
$imageModel->edit(['is_cos'=>0],['id'=>$v['id']]);
|
36
|
$imageModel->edit(['is_cos'=>0],['id'=>$v['id']]);
|
|
37
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$rs, true) . PHP_EOL, FILE_APPEND);
|
37
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$rs, true) . PHP_EOL, FILE_APPEND);
|
|
38
|
}
|
38
|
}
|
|
@@ -44,7 +44,7 @@ class CopyImageFileListener implements ShouldQueue |
|
@@ -44,7 +44,7 @@ class CopyImageFileListener implements ShouldQueue |
|
44
|
if(!empty($fileList)){
|
44
|
if(!empty($fileList)){
|
|
45
|
$amazonS3Service = new AmazonS3Service();
|
45
|
$amazonS3Service = new AmazonS3Service();
|
|
46
|
foreach ($fileList as $k => $v){
|
46
|
foreach ($fileList as $k => $v){
|
|
47
|
- $amazonS3Service->syncImageFiles(getImageUrl($v['path']));
|
47
|
+ $amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']);
|
|
48
|
$fileList->edit(['is_cos'=>0],['id'=>$v['id']]);
|
48
|
$fileList->edit(['is_cos'=>0],['id'=>$v['id']]);
|
|
49
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('文件:'.$v['id'], true) . PHP_EOL, FILE_APPEND);
|
49
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('文件:'.$v['id'], true) . PHP_EOL, FILE_APPEND);
|
|
50
|
}
|
50
|
}
|