Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Feature】add Content-Disposition when putting object api #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
7 changes: 4 additions & 3 deletions obs/model_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ type ObjectOperationInput struct {
// PutObjectBasicInput defines the basic object operation properties
type PutObjectBasicInput struct {
ObjectOperationInput
ContentType string
ContentMD5 string
ContentLength int64
ContentType string
ContentMD5 string
ContentLength int64
ContentDisposition string
}

// PutObjectInput is the input parameter of PutObject function
Expand Down
3 changes: 3 additions & 0 deletions obs/trait.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,9 @@ func (input PutObjectBasicInput) trans(isObs bool) (params map[string]string, he
if input.ContentType != "" {
headers[HEADER_CONTENT_TYPE_CAML] = []string{input.ContentType}
}
if input.ContentDisposition != "" {
headers[HEADER_CONTENT_DISPOSITION_CAMEL] = []string{input.ContentDisposition}
}

return
}
Expand Down