summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api-put-object.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api-put-object.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object.go b/vendor/github.com/minio/minio-go/v7/api-put-object.go
index 5735bee5e..2376ee874 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object.go
@@ -87,7 +87,12 @@ type PutObjectOptions struct {
SendContentMd5 bool
DisableContentSha256 bool
DisableMultipart bool
- Internal AdvancedPutOptions
+
+ // ConcurrentStreamParts will create NumThreads buffers of PartSize bytes,
+ // fill them serially and upload them in parallel.
+ // This can be used for faster uploads on non-seekable or slow-to-seek input.
+ ConcurrentStreamParts bool
+ Internal AdvancedPutOptions
}
// getNumThreads - gets the number of threads to be used in the multipart
@@ -272,6 +277,9 @@ func (c *Client) putObjectCommon(ctx context.Context, bucketName, objectName str
if opts.DisableMultipart {
return UploadInfo{}, errors.New("no length provided and multipart disabled")
}
+ if opts.ConcurrentStreamParts && opts.NumThreads > 1 {
+ return c.putObjectMultipartStreamParallel(ctx, bucketName, objectName, reader, opts)
+ }
return c.putObjectMultipartStreamNoLength(ctx, bucketName, objectName, reader, opts)
}