ObjectStorage refactor to take io.Reader instead of []byte

This commit is contained in:
Frederick F. Kautz IV committed 2014-12-10 20:57:59 -08:00
1 parent c7b4e14f64
commit 19da9760b3
7 files changed
+65 -43

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
package gateway
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
@@ -212,7 +213,7 @@ func SimpleFileStorageDriver(bucket string, input chan ObjectRequest, config Gat
}
case "PUT":
objectPath := path.Join(bucket, request.path)
fileStorage.Put(objectPath, request.object)
fileStorage.Put(objectPath, bytes.NewBuffer(request.object))
request.callback <- nil
default:
request.callback <- errors.New("Unexpected message")