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

This commit is contained in:
Frederick F. Kautz IV
2014-12-10 20:40:53 -08:00
parent c7b4e14f64
commit 19da9760b3
7 changed files with 65 additions and 43 deletions

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")