作者 lyh

gx

@@ -41,7 +41,7 @@ class CosService @@ -41,7 +41,7 @@ class CosService
41 'Body' => $Body, 41 'Body' => $Body,
42 ]; 42 ];
43 //水印 43 //水印
44 -// if ($watermarkOptions) { 44 + if ($watermarkOptions) {
45 $options['Pic-Operations'] = json_encode([ 45 $options['Pic-Operations'] = json_encode([
46 'is_pic_info' => 1, 46 'is_pic_info' => 1,
47 'rules' => [ 47 'rules' => [
@@ -51,8 +51,8 @@ class CosService @@ -51,8 +51,8 @@ class CosService
51 'rule' => 'watermark/2/text/dGVzdA/gravity/center' 51 'rule' => 'watermark/2/text/dGVzdA/gravity/center'
52 ] 52 ]
53 ] 53 ]
54 - ],true);  
55 -// } 54 + ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
  55 + }
56 // 上传文件 56 // 上传文件
57 $res = $cosClient->putObject($options); 57 $res = $cosClient->putObject($options);
58 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND); 58 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND);