MCPcopy
hub / github.com/minio/minio-go / PutObject

Method PutObject

core.go:73–76  ·  view source on GitHub ↗

PutObject - Upload object. Uploads using single PUT call.

(ctx context.Context, bucket, object string, data io.Reader, size int64, md5Base64, sha256Hex string, opts PutObjectOptions)

Source from the content-addressed store, hash-verified

71
72// PutObject - Upload object. Uploads using single PUT call.
73func (c Core) PutObject(ctx context.Context, bucket, object string, data io.Reader, size int64, md5Base64, sha256Hex string, opts PutObjectOptions) (UploadInfo, error) {
74 hookReader := newHook(data, opts.Progress)
75 return c.putObjectDo(ctx, bucket, object, hookReader, md5Base64, sha256Hex, size, opts)
76}
77
78// NewMultipartUpload - Initiates new multipart upload and returns the new uploadID.
79func (c Core) NewMultipartUpload(ctx context.Context, bucket, object string, opts PutObjectOptions) (uploadID string, err error) {

Calls 2

newHookFunction · 0.85
putObjectDoMethod · 0.80

Tested by 6

TestCoreCopyObjectFunction · 0.76
TestCoreCopyObjectPartFunction · 0.76
TestCorePutObjectFunction · 0.76
TestGetObjectCoreFunction · 0.36