agin719
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
example/object/moveObject.go
-
object.go
|
|
@ -59,7 +59,7 @@ func main() { |
|
|
|
// 重命名
|
|
|
|
dest := "test/newfile" |
|
|
|
soruceURL := fmt.Sprintf("%s/%s", u.Host, source) |
|
|
|
_, _, err := c.Object.Copy(context.Background(), dest, soruceURL, nil) |
|
|
|
_, _, err = c.Object.Copy(context.Background(), dest, soruceURL, nil) |
|
|
|
log_status(err) |
|
|
|
if err == nil { |
|
|
|
_, err = c.Object.Delete(context.Background(), source, nil) |
|
|
|
|
|
@ -940,7 +940,9 @@ func (s *ObjectService) Upload(ctx context.Context, name string, filepath string |
|
|
|
var listener ProgressListener |
|
|
|
var consumedBytes int64 |
|
|
|
if opt.OptIni != nil { |
|
|
|
listener = opt.OptIni.Listener |
|
|
|
if opt.OptIni.ObjectPutHeaderOptions != nil { |
|
|
|
listener = opt.OptIni.Listener |
|
|
|
} |
|
|
|
optcom.XOptionHeader, _ = deliverInitOptions(opt.OptIni) |
|
|
|
} |
|
|
|
event := newProgressEvent(ProgressStartedEvent, 0, 0, totalBytes) |
|
|
|
xxxxxxxxxx