Skip to content

Commit 2c500a8

Browse files
author
jojoliang
committed
update retry
1 parent b037b1d commit 2c500a8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

object.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,8 @@ func (s *ObjectService) Put(ctx context.Context, name string, r io.Reader, uopt
409409
}
410410

411411
// PutFromFile put object from local file
412-
func (s *ObjectService) PutFromFile(ctx context.Context, name string, filePath string, opt *ObjectPutOptions) (resp *Response, err error) {
413-
if opt == nil {
414-
opt = &ObjectPutOptions{}
415-
}
412+
func (s *ObjectService) PutFromFile(ctx context.Context, name string, filePath string, uopt *ObjectPutOptions) (resp *Response, err error) {
413+
opt := CloneObjectPutOptions(uopt)
416414
nr := 0
417415
for nr < 3 {
418416
fd, e := os.Open(filePath)

0 commit comments

Comments
 (0)