parent
fc81eae5aa
commit
1a759c39a3
|
@ -96,10 +96,17 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
func uploadStorage(svcCtx *svc.ServiceContext, name string) error {
|
func uploadStorage(svcCtx *svc.ServiceContext, name string) error {
|
||||||
svcCtx.Uploader.Upload(&s3manager.UploadInput{
|
fileInfo, err := os.Open(filepath.Join(uploadPath, name))
|
||||||
|
upload, err := svcCtx.Uploader.Upload(&s3manager.UploadInput{
|
||||||
Bucket: aws.String("pcm"),
|
Bucket: aws.String("pcm"),
|
||||||
Key: aws.String(name),
|
Key: aws.String(name),
|
||||||
|
Body: fileInfo,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
println(upload.UploadID)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue