Merge pull request #643 from harshavardhana/pr_out_fix_a_bug_for_last_part_not_being_uploaded_due_to_lack_of_short_read_error_handling
This commit is contained in:
Generated
+1
-1
@@ -36,7 +36,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/minio/objectstorage-go",
|
||||
"Rev": "e0670aef1a63a46d0dc5dc2dba2088f55b73b4b5"
|
||||
"Rev": "d5c404eb7097242a4f9f8c52fd7fce15551d0317"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/shiena/ansicolor",
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ func (a *api) listMultipartUploadsRecursiveInRoutine(bucket, prefix string, ch c
|
||||
//
|
||||
// You must have WRITE permissions on a bucket to create an object
|
||||
//
|
||||
// This version of CreateObject automatically does multipart for more than 5MB worth of data
|
||||
// This version of PutObject automatically does multipart for more than 5MB worth of data
|
||||
func (a *api) PutObject(bucket, object string, size uint64, data io.Reader) error {
|
||||
if strings.TrimSpace(object) == "" {
|
||||
return errors.New("object name cannot be empty")
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -41,7 +41,7 @@ func main() {
|
||||
object.Close()
|
||||
log.Fatalln(err)
|
||||
}
|
||||
uploadID, err := m.CreateObject("testbucket", "testfile", uint64(objectInfo.Size()), object)
|
||||
uploadID, err := m.PutObject("testbucket", "testfile", uint64(objectInfo.Size()), object)
|
||||
if err != nil {
|
||||
object.Close()
|
||||
log.Fatalln(err)
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -41,7 +41,7 @@ func main() {
|
||||
object.Close()
|
||||
log.Fatalln(err)
|
||||
}
|
||||
uploadID, err := m.CreateObject("testbucket", "testfile", uint64(objectInfo.Size()), object)
|
||||
uploadID, err := m.PutObject("testbucket", "testfile", uint64(objectInfo.Size()), object)
|
||||
if err != nil {
|
||||
object.Close()
|
||||
log.Fatalln(err)
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ func multiPartInRoutine(reader io.Reader, chunkSize uint64, skipParts []int, ch
|
||||
part := make([]byte, chunkSize)
|
||||
n, err = io.ReadFull(reader, part)
|
||||
if err != nil {
|
||||
if err != io.EOF { // catastrophic error
|
||||
if err != io.EOF && err != io.ErrUnexpectedEOF { // catastrophic error
|
||||
ch <- Part{
|
||||
Data: nil,
|
||||
Err: err,
|
||||
|
||||
Reference in New Issue
Block a user