Feat: resume upload in server side

This commit is contained in:
HFO4
2020-01-21 15:36:04 +08:00
parent 06ff8b5a50
commit 752ce5ce62
8 changed files with 178 additions and 22 deletions

View File

@@ -85,7 +85,19 @@ func WithCredential(instance auth.Auth, ttl int64) Option {
// WithHeader 设置请求Header
func WithHeader(header http.Header) Option {
return optionFunc(func(o *options) {
o.header = header
for k, v := range header {
o.header[k] = v
}
})
}
// WithoutHeader 设置清除请求Header
func WithoutHeader(header []string) Option {
return optionFunc(func(o *options) {
for _, v := range header {
delete(o.header, v)
}
})
}