mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Now MinioAPI handles Content-MD5 set during putObject()
- This change also facilitates proper error response
in case of md5 mismatch or corruption
- TODO a test function needs to be implemented
This commit is contained in:
@@ -18,8 +18,6 @@ package encoded
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"io"
|
||||
"sort"
|
||||
@@ -27,6 +25,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
|
||||
"github.com/minio-io/minio/pkg/donutbox"
|
||||
"github.com/minio-io/minio/pkg/encoding/erasure"
|
||||
"github.com/minio-io/minio/pkg/storage"
|
||||
@@ -285,7 +286,7 @@ func beforeDelimiter(inputs []string, delim string) (results []string) {
|
||||
}
|
||||
|
||||
// CreateObject creates a new object
|
||||
func (diskStorage StorageDriver) CreateObject(bucketKey string, objectKey string, contentType string, reader io.Reader) error {
|
||||
func (diskStorage StorageDriver) CreateObject(bucketKey, objectKey, contentType, md5sum string, reader io.Reader) error {
|
||||
// set defaults
|
||||
if contentType == "" {
|
||||
contentType = "application/octet-stream"
|
||||
|
||||
Reference in New Issue
Block a user