Skip to content

Commit ab94fa2

Browse files
Merge pull request #124 from nhandler/110-optional-acl
Don't Specify an ACL by Default (Fixes #110)
2 parents fe9d75b + 9070b33 commit ab94fa2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ func main() {
6767
cli.StringFlag{
6868
Name: "acl",
6969
Usage: "upload files with acl",
70-
Value: "private",
7170
EnvVar: "PLUGIN_ACL",
7271
},
7372
cli.StringFlag{

plugin.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ func (p *Plugin) Exec() error {
197197
Body: f,
198198
Bucket: &(p.Bucket),
199199
Key: &target,
200-
ACL: &(p.Access),
201200
}
202201

203202
if contentType != "" {
@@ -220,6 +219,10 @@ func (p *Plugin) Exec() error {
220219
putObjectInput.StorageClass = &(p.StorageClass)
221220
}
222221

222+
if p.Access != "" {
223+
putObjectInput.ACL = &(p.Access)
224+
}
225+
223226
_, err = client.PutObject(putObjectInput)
224227

225228
if err != nil {

0 commit comments

Comments
 (0)