mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 01:06:27 +00:00
commit
305aa129d2
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -69,9 +68,9 @@ func pushAWS(args []string) {
|
||||
name = filepath.Base(name)
|
||||
}
|
||||
|
||||
content, err := ioutil.ReadAll(f)
|
||||
fi, err := f.Stat()
|
||||
if err != nil {
|
||||
log.Fatalf("Error reading file: %v", err)
|
||||
log.Fatalf("Error reading file information: %v", err)
|
||||
}
|
||||
|
||||
dst := name + filepath.Ext(path)
|
||||
@ -79,7 +78,7 @@ func pushAWS(args []string) {
|
||||
Bucket: aws.String(bucket),
|
||||
Key: aws.String(dst),
|
||||
Body: f,
|
||||
ContentLength: aws.Int64(int64(len(content))),
|
||||
ContentLength: aws.Int64(fi.Size()),
|
||||
ContentType: aws.String("application/octet-stream"),
|
||||
}
|
||||
log.Debugf("PutObject:\n%v", putParams)
|
||||
|
Loading…
Reference in New Issue
Block a user