From 3470e3b6a14d307ea0393f62fa7fe3d6a8e4537b Mon Sep 17 00:00:00 2001 From: Milan Thapa Date: Tue, 28 Nov 2017 07:33:49 +0545 Subject: [PATCH] syncing with upstream api for minion with blank options --- strata/miniostorage/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strata/miniostorage/storage.go b/strata/miniostorage/storage.go index a2af613..9e1152b 100644 --- a/strata/miniostorage/storage.go +++ b/strata/miniostorage/storage.go @@ -60,7 +60,7 @@ func NewMinioStorage(endPoint, accessKeyID, secretAccessKey, bucket, prefix, reg func (m *MinioStorage) Get(name string) (io.ReadCloser, error) { path := m.addPrefix(name) - obj, err := m.minio.GetObject(m.bucket, path) + obj, err := m.minio.GetObject(m.bucket, path, minio.GetObjectOptions{}) if err != nil { return nil, err } @@ -72,7 +72,7 @@ func (m *MinioStorage) Get(name string) (io.ReadCloser, error) { func (m *MinioStorage) Put(name string, data []byte) error { path := m.addPrefix(name) - _, err := m.minio.PutObject(m.bucket, path, bytes.NewReader(data), "application/octet-stream") + _, err := m.minio.PutObject(m.bucket, path, bytes.NewReader(data), int64(len(data)), minio.PutObjectOptions{ContentType: "application/octet-stream"}) return err }