我有下一个代码可从亚马逊获取URL,但我需要该URL类似于
https://vis3dev.s3.amazonaws.com/359952_1550525274.mp4
而不是
func GetFileLink(svc *session.Session) error {
req, _ := s3.New(svc).GetObjectRequest(&s3.GetObjectInput{
Bucket: aws.String(AwsBucket),
Key: aws.String(NameFile + ".mp4"),
})
url, err := req.Presign(15 * time.Minute)
if err != nil {
fmt.Print(err)
}
fmt.Println(url)
return err
}
答案 0 :(得分:0)
acl := "public-read"
我通过添加ACL: aws.String(acl),