Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled optional ACL setting. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.js
Expand Up @@ -92,7 +92,8 @@ function upload(opts) {
Key: opts.key, /* required */
Body: opts.body,
CacheControl: config.cache,
ContentType: opts.contentType
ContentType: opts.contentType,
ACL: config.acl
};

if (opts.encoding) {
Expand Down
16 changes: 15 additions & 1 deletion readme.md
Expand Up @@ -15,14 +15,16 @@ Set configuration as a json file:
"bucket": "my.s3.bucket.name",
"directory": "/path/to/my/website/_site",
"compress": "html|css|js|json",
"cache": "max-age=60"
"cache": "max-age=60",
"acl": "private"
}
```

- `bucket` an S3 bucket
- `directory` local directory to sync with bucket
- `compress` regex match for files to apply gzip compression
- `cache` `Cache-control` header value
- `acl` A canned ACL to apply to all objects (see below)

Uses the AWS Javascript SDK, so it reads your AWS credentials from environment variables or a local file. [See more here](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Setting_AWS_Credentials).

Expand All @@ -34,3 +36,15 @@ Run with the config file path (e.g. `~/path-to/config.json`) as an argument.
$ npm install
$ node app.js [config file]
```

## ACL Values

The default ACL value is "bucket-owner-full-control" and will be used if no setting is provided. Possible values include:

* "private"
* "public-read"
* "public-read-write"
* "authenticated-read"
* "aws-exec-read"
* "bucket-owner-read"
* "bucket-owner-full-control"