Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Fix strata build updating minio putObject and getObject api methods #37

Merged
merged 1 commit into from
Nov 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions strata/miniostorage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down