fix(backend/storage): codefix
This commit is contained in:
parent
1e5deed0d5
commit
6412c2a862
2 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import (
|
|||
"io"
|
||||
)
|
||||
|
||||
func gzipFile(file io.ReadSeeker) io.Reader {
|
||||
func gzipFile(file io.Reader) io.Reader {
|
||||
reader, writer := io.Pipe()
|
||||
go func() {
|
||||
gw, _ := gzip.NewWriterLevel(writer, gzip.BestSpeed)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"bytes"
|
||||
"io"
|
||||
"ioutill"
|
||||
//"io/ioutil"
|
||||
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
|
@ -56,7 +56,7 @@ func main() {
|
|||
log.Printf("File read error: %f", err)
|
||||
return
|
||||
}
|
||||
startReader = bytes.NewBuffer(startBytes)
|
||||
startReader := bytes.NewBuffer(startBytes)
|
||||
if err := storage.Upload(gzipFile(startReader), key+"-s", "application/octet-stream", true); err != nil {
|
||||
log.Fatalf("Storage: start upload failed. %v\n", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue