Skip to content

Commit

Permalink
Merge branch 'master' into feature/acl-functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
igneosaur committed Apr 19, 2016
2 parents 8b9b8b0 + 70591f3 commit f940363
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ app.post('/upload', upload.array('photos', 3), function(req, res, next) {
})
```

### File information

Each file contains the following information exposed by `multer-s3`:

Key | Description | Note
--- | --- | ---
`size` | Size of the file in bytes |
`bucket` | The bucket used to store the file | `S3Storage`
`key` | The name of the file | `S3Storage`
`acl` | Access control for the file | `S3Storage`
`contentType` | The `mimetype` used to upload the file | `S3Storage`
`location` | The S3 `url` to access the file | `S3Storage`
`etag` | The `etag`of the uploaded file in S3 | `S3Storage`

### Setting ACL

[ACL values](http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) can be set by passing an optional `acl` parameter into the `multerS3` object.
Expand Down Expand Up @@ -67,7 +81,6 @@ Available options for canned ACL.
| `log-delivery-write` | The `LogDelivery` group gets `WRITE` and `READ_ACP` permissions on the bucket. For more information on logs. |



## Testing

The tests mock all access to S3 and can be run completely offline.
Expand Down

0 comments on commit f940363

Please sign in to comment.