Pass buffer instead of byte slice

s3 library creates internal buffer pass in byte slice
This commit is contained in:
Chris Howey 2015-06-14 09:05:20 -05:00
parent 12596c6841
commit cf0531a2b1
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ func (bb *s3Blob) Finalize(t backend.Type, name string) error {
} }
<-bb.b.connChan <-bb.b.connChan
err = bb.b.bucket.Put(path, bb.buf.Bytes(), "binary/octet-stream", "private") err = bb.b.bucket.PutReader(path, bb.buf, int64(bb.buf.Len()), "binary/octet-stream", "private")
bb.b.connChan <- struct{}{} bb.b.connChan <- struct{}{}
bb.buf.Reset() bb.buf.Reset()
return err return err