作者 lyh

gx

@@ -48,13 +48,12 @@ class CosService @@ -48,13 +48,12 @@ class CosService
48 [ 48 [
49 'fileid' => $key, // 使用相同的文件名保存 49 'fileid' => $key, // 使用相同的文件名保存
50 // 'rule' => 'watermark/1/'.implode('/',$watermarkOptions), 50 // 'rule' => 'watermark/1/'.implode('/',$watermarkOptions),
51 - 'rule' => 'watermark/2/text/dGVzdA' 51 + 'rule' => 'watermark/2/text/dGVzdA/gravity/center'
52 ] 52 ]
53 ] 53 ]
54 ],true); 54 ],true);
55 } 55 }
56 // 上传文件 56 // 上传文件
57 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($options, true) . PHP_EOL, FILE_APPEND);  
58 $res = $cosClient->putObject($options); 57 $res = $cosClient->putObject($options);
59 @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);
60 return $key; 59 return $key;