我正在寻找用于计算要与 IBM Cloud Object Storage API 一起使用以删除多个对象的 md5-content 标头的 unix 命令。我试过echo “request body….” | md5 | base64
了,但是 API 响应是 - `
您指定的 Content-MD5 无效。
卷曲命令:
curl -H "Content-Type: text/plain;charset=utf-8" -H "Content-MD5: 75ff06f81643655397a5911ddc195ce8" -H "Authorization: $AuthToken" "https://<cos-endpoint-name>/<bucket-name>?delete" -d 'xml body...'
错误响应:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Error><Code>InvalidDigest</Code><Message>The Content-MD5 you specified was an invalid.</Message><Resource>/ghhsa-bucket-etl-dev/</Resource><RequestId>aed25243-22a1-477d-9ab8-b87780625a61</RequestId><httpStatusCode>400</httpStatusCode></Error>
感谢对此的任何指示。