Improve the s3 uploader for better performance.
Signed-off-by: dkkb <dabkb@aol.com>
This commit is contained in:
@@ -15,7 +15,6 @@ package openpitrix
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"k8s.io/klog"
|
||||
|
||||
@@ -66,7 +65,7 @@ func (c *attachmentOperator) CreateAttachment(data []byte) (*Attachment, error)
|
||||
}
|
||||
id := idutils.GetUuid36(v1alpha1.HelmAttachmentPrefix)
|
||||
|
||||
err := c.backingStoreClient.Upload(id, id, bytes.NewBuffer(data))
|
||||
err := c.backingStoreClient.Upload(id, id, bytes.NewBuffer(data), len(data))
|
||||
if err != nil {
|
||||
klog.Errorf("upload attachment failed, err: %s", err)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user