# Storage

## S3 Storage

The S3 storage uploads transformations to a S3 bucket, or any other provider implementing the S3 interface (for example Digital Ocean Spaces).

{% hint style="info" %}
**Digital Ocean** can be used by adding an endpoint.
{% endhint %}

### Example

{% code title="config.yml" %}
```yaml
storage:
  s3:
    access_key_id: 'xxxx'
    secret_access_key: 'yyyy'
    region: 'nyc3'
    bucket_name: 'zzz'
    path: '/:preset/:image'
```
{% endcode %}

### Options

| Name                |                                                                                                                                                                                                                                                                                                                   |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| access\_key\_id     | <p>Access key id from S3</p><p><br><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                                                                                                              |
| secret\_access\_key | <p>Secret access key from S3</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                                                                                                              |
| region              | <p>Region of S3 bucket</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                                                                                                                    |
| bucket\_name        | <p>Name of bucket</p><p><strong>Type:</strong> string</p><p><strong>Required</strong></p>                                                                                                                                                                                                                         |
| path                | <p>Path of the original image in the bucket.</p><p><strong>Type:</strong> string with parameters</p><p><strong>Required</strong></p>                                                                                                                                                                              |
| endpoint            | <p>Which endpoint to use, useful if using Digital Ocean Spaces.</p><p><strong>Type:</strong> string</p><p><strong>Default:</strong> derived from bucket_name and region, as per AWS standard.</p>                                                                                                                 |
| ACL                 | <p>What ACL should be set on the uploaded object. See available values here: <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html</a>.</p><p><strong>Type:</strong> string</p><p><strong>Default</strong>: 'private'</p> |

## Hash header

SpaceChop makes use of a metadata header `x-amz-meta-hash` on storages in order to keep transformations up to date as preset configuration changes.
