diff --git a/cmd/client/main.go b/cmd/client/main.go index d3a50a1..9e5fcf0 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -28,7 +28,7 @@ var ( storageClass string tableSpace string multipartChunksize int64 - doMultipart bool + multipartUpload bool offset uint64 @@ -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) diff --git a/pkg/message/put_message_v2.go b/pkg/message/put_message_v2.go index 6eaf3c2..b9ba21f 100644 --- a/pkg/message/put_message_v2.go +++ b/pkg/message/put_message_v2.go @@ -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 diff --git a/pkg/storage/s3storage.go b/pkg/storage/s3storage.go index b24bf14..a2dc98b 100644 --- a/pkg/storage/s3storage.go +++ b/pkg/storage/s3storage.go @@ -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 } @@ -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),