作者 lyh

gx

... ... @@ -41,18 +41,18 @@ class CosService
'Body' => $Body,
];
//水印
if ($watermarkOptions) {
// if ($watermarkOptions) {
$options['Pic-Operations'] = json_encode([
'is_pic_info' => 1,
'rules' => [
[
'fileid' => $filename, // 使用相同的文件名保存
'fileid' => $key, // 使用相同的文件名保存
// 'rule' => 'watermark/1/'.implode('/',$watermarkOptions),
'rule' => 'watermark/2/text/dGVzdA/gravity/center'
]
]
],true);
}
// }
// 上传文件
$res = $cosClient->putObject($options);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND);
... ...