@@ -284,6 +284,7 @@ type ObjectDeleteOptions struct {
284284 XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"`
285285 //兼容其他自定义头部
286286 XOptionHeader * http.Header `header:"-,omitempty" url:"-" xml:"-"`
287+ VersionId string `header:"-" url:"VersionId,omitempty" xml:"-"`
287288}
288289
289290// Delete Object请求可以将一个文件(Object)删除。
@@ -304,6 +305,7 @@ func (s *ObjectService) Delete(ctx context.Context, name string, opt ...*ObjectD
304305 uri : "/" + encodeURIComponent (name ),
305306 method : http .MethodDelete ,
306307 optHeader : optHeader ,
308+ optQuery : optHeader ,
307309 }
308310 resp , err := s .client .send (ctx , & sendOpt )
309311 return resp , err
@@ -440,9 +442,10 @@ type ObjectDeleteMultiResult struct {
440442 XMLName xml.Name `xml:"DeleteResult"`
441443 DeletedObjects []Object `xml:"Deleted,omitempty"`
442444 Errors []struct {
443- Key string
444- Code string
445- Message string
445+ Key string `xml:",omitempty"`
446+ Code string `xml:",omitempty"`
447+ Message string `xml:",omitempty"`
448+ VersionId string `xml:",omitempty"`
446449 } `xml:"Error,omitempty"`
447450}
448451
@@ -472,6 +475,7 @@ type Object struct {
472475 LastModified string `xml:",omitempty"`
473476 StorageClass string `xml:",omitempty"`
474477 Owner * Owner `xml:",omitempty"`
478+ VersionId string `xml:",omitempty"`
475479}
476480
477481// MultiUploadOptions is the option of the multiupload,
0 commit comments