-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: improve cmd of downloading and uploading #90
Conversation
* feat: support resumable download * feat: fix some comment
83af1a5
to
9ced606
Compare
|
||
// Check if object is sealed | ||
timeout := time.After(1 * time.Hour) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it need to be that long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After our discussion, we changed the seal printing strategy here. Users can manually cancel the wait for seal or set --bypassSeal now. If they do not cancel, they will wait until seal by default, so this time can actually be infinite.
} | ||
return filePath, fmt.Errorf("download file:%s already exist\n", filePath) | ||
} | ||
return filePath, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return filePath, nil
-> return filePath, err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this file does not exist, it will be created for the user using CREAT mode open, so there is no need to return err.
cmd/utils.go
Outdated
@@ -103,6 +105,7 @@ const ( | |||
|
|||
noBalanceErr = "key not found" | |||
maxListMemberNum = 1000 | |||
objectLargerSize = 10 * 1024 * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little bit confused the naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Description
Rationale
improve cmd API
Example
Changes