fix: use bufio reader
This commit is contained in:
parent
b48db1d8c4
commit
90e4ce6408
|
@ -1,6 +1,7 @@
|
||||||
package files
|
package files
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -62,7 +63,7 @@ func Upload(r io.ReadSeeker) (model.Upload, error) {
|
||||||
return upload, errors.New("file already exists in network, but missing in database")
|
return upload, errors.New("file already exists in network, but missing in database")
|
||||||
}
|
}
|
||||||
|
|
||||||
tree, err := bao.ComputeBaoTree(r)
|
tree, err := bao.ComputeBaoTree(bufio.NewReader(r))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return upload, err
|
return upload, err
|
||||||
|
|
Loading…
Reference in New Issue