Skip to content

Commit

Permalink
remove md5 hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Sep 21, 2023
1 parent 8bab1ed commit 978e656
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/serve/s3/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package s3

import (
"context"
"crypto/md5"
"encoding/hex"
"io"
"log"
Expand Down Expand Up @@ -306,8 +305,7 @@ func (db *s3Backend) PutObject(
return result, err
}

hasher := md5.New()
w := io.MultiWriter(f, hasher)
w := io.MultiWriter(f)
if _, err := io.Copy(w, input); err != nil {
// remove file when i/o error occurred (FsPutErr)
_ = f.Close()
Expand Down

0 comments on commit 978e656

Please sign in to comment.