S3:用于将文件上传到 Amazon s3 的 golang 库。 仅将对象放入 S3 存储桶
去 github.com/apisit/s3
导入(“github.com/apisit/s3”)
//使用它 accessKey := "key" secretKey := "key" keyFilename := "something.jpg" filename := "something.jpg" bucketName := "sps-photos" amazonS3 := s3.Init(accessKey, secretKey ) amazonS3.Upload(keyFilename, bucketName, 文件名)