Skip to content

Commit 3b45c0a

Browse files
authored
Merge pull request #96 from agin719/cos-v4-dev
update ci
2 parents b8afb3f + ba2e64b commit 3b45c0a

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

ci.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ func EncodePicOperations(pic *PicOperations) string {
3131
}
3232

3333
type ImageProcessResult struct {
34-
XMLName xml.Name `xml:"UploadResult"`
35-
OriginalInfo *PicOriginalInfo `xml:"OriginalInfo,omitempty"`
36-
ProcessObject *PicProcessObject `xml:"ProcessResults>Object,omitempty"`
34+
XMLName xml.Name `xml:"UploadResult"`
35+
OriginalInfo *PicOriginalInfo `xml:"OriginalInfo,omitempty"`
36+
ProcessResults *PicProcessObject `xml:"ProcessResults>Object,omitempty"`
3737
}
3838
type PicOriginalInfo struct {
3939
Key string `xml:"Key,omitempty"`
4040
Location string `xml:"Location,omitempty"`
4141
ImageInfo *PicImageInfo `xml:"ImageInfo,omitempty"`
42+
ETag string `xml:"ETag,omitempty"`
4243
}
4344
type PicImageInfo struct {
44-
Format string `xml:"Format,omitempty"`
45-
Width int `xml:"Width,omitempty"`
46-
Height int `xml:"Height,omitempty"`
47-
Size int `xml:"Size,omitempty"`
48-
Quality int `xml:"Quality,omitempty"`
45+
Format string `xml:"Format,omitempty"`
46+
Width int `xml:"Width,omitempty"`
47+
Height int `xml:"Height,omitempty"`
48+
Quality int `xml:"Quality,omitempty"`
49+
Ave string `xml:"Ave,omitempty"`
50+
Orientation int `xml:"Orientation,omitempty"`
4951
}
5052
type PicProcessObject struct {
5153
Key string `xml:"Key,omitempty"`
@@ -55,6 +57,7 @@ type PicProcessObject struct {
5557
Height int `xml:"Height,omitempty"`
5658
Size int `xml:"Size,omitempty"`
5759
Quality int `xml:"Quality,omitempty"`
60+
ETag string `xml:"ETag,omitempty"`
5861
WatermarkStatus int `xml:"WatermarkStatus,omitempty"`
5962
}
6063

ci_doc.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ type DocPreviewOptions struct {
261261

262262
func (s *CIService) DocPreview(ctx context.Context, name string, opt *DocPreviewOptions) (*Response, error) {
263263
sendOpt := sendOptions{
264-
baseURL: s.client.BaseURL.BucketURL,
265-
uri: "/" + encodeURIComponent(name) + "?ci-process=doc-preview",
266-
optQuery: opt,
267-
method: http.MethodGet,
264+
baseURL: s.client.BaseURL.BucketURL,
265+
uri: "/" + encodeURIComponent(name) + "?ci-process=doc-preview",
266+
optQuery: opt,
267+
method: http.MethodGet,
268+
disableCloseBody: true,
268269
}
269270
resp, err := s.client.send(ctx, &sendOpt)
270271
return resp, err

cos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
const (
2424
// Version current go sdk version
25-
Version = "0.7.14"
25+
Version = "0.7.15"
2626
userAgent = "cos-go-sdk-v5/" + Version
2727
contentTypeXML = "application/xml"
2828
defaultServiceBaseURL = "http://service.cos.myqcloud.com"

0 commit comments

Comments
 (0)