Skip to content

Commit

Permalink
rename to multipart_upload
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Oct 7, 2024
1 parent 449d747 commit 07fd8ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var (
storageClass string
tableSpace string
multipartChunksize int64
doMultipart bool
multipartUpload bool

offset uint64

Expand Down Expand Up @@ -122,8 +122,8 @@ func putFunc(con net.Conn, instanceCnf *config.Instance, args []string) error {
Value: fmt.Sprintf("%d", multipartChunksize),
},
{
Name: message.DoMultipart,
Value: fmt.Sprintf("%t", doMultipart),
Name: message.MultipartUpload,
Value: fmt.Sprintf("%t", multipartUpload),
},
}).Encode()
_, err := con.Write(msg)
Expand Down
2 changes: 1 addition & 1 deletion pkg/message/put_message_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
const StorageClassSetting = "StorageClass"
const TableSpaceSetting = "TableSpace"
const MultipartChunksize = "MultipartChunksize"
const DoMultipart = "DoMultipart"
const MultipartUpload = "MultipartUpload"

type PutMessageV2 struct {
Encrypt bool
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/s3storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (s *S3StorageInteractor) PutFileToDest(name string, r io.Reader, settings [
if err != nil {
return err
}
doMultipart, err := strconv.ParseBool(ResolveStorageSetting(settings, message.DoMultipart, "1"))
multipartUpload, err := strconv.ParseBool(ResolveStorageSetting(settings, message.MultipartUpload, "1"))
if err != nil {
return err
}
Expand All @@ -95,7 +95,7 @@ func (s *S3StorageInteractor) PutFileToDest(name string, r io.Reader, settings [
return err
}

if doMultipart {
if multipartUpload {
_, err = up.Upload(
&s3manager.UploadInput{
Bucket: aws.String(bucket),
Expand Down

0 comments on commit 07fd8ab

Please sign in to comment.