• Document Up to Date

Blob Stores Configuration

The Blob Stores configuration file allows you to configure 0 or more stores for assets with the corresponding information required by the store being used. To modify the Blob Stores configuration, click on siteConfig from the bottom of the Sidebar, then click on Configuration and select Blob Stores from the dropdown list.

Configurations - Open Blob Stores Configuration

Sample

CRAFTER_HOME/data/repos/sites/SITENAME/sandbox/config/studio/blob-stores-config.xml
 1<?xml version="1.0" encoding="UTF-8"?>
 2
 3<!--
 4  Blob stores configuration file.
 5
 6  For every store you need to specify:
 7  <blobStore>
 8    <id/>
 9    <type/>
10    <pattern/>
11    <mappings>
12      <mapping>
13        <publishingTarget/>
14        <storeTarget/>
15        <prefix/>
16      </mapping>
17    </mappings>
18    <configuration/>
19  </blobStore>
20
21  id:       a unique id for the store
22  type: the type of store to use
23  pattern: the regex to match file paths
24  mappings.mapping.publishingTarget: the name of the publishing storeTarget (preview, staging, live)
25  mappings.mapping.storeTarget: the name of the storeTarget inside the store
26  mappings.mapping.prefix: the prefix to use for all paths (optional)
27  configuration: configuration specific for the store type
28
29  Every store can require additional properties.
30-->
31<blobStores>
32  <!--
33    AWS S3 Store
34
35    Configuration properties:
36
37    <credentials>
38      <accessKey/>
39      <secretKey/>
40    </credentials>
41    <region/>
42    <endpoint/>
43    <pathStyleAccess/>
44
45    credentials.accessKey: AWS access key (optional)
46    credentials.secretKey: AWS secret key (optional)
47    region: AWS region for the service (optional)
48    pathStyleAccess: indicates if path style access should be used for all requests (defaults to false)
49
50  -->
51
52  <blobStore>
53    <id>s3-store</id>
54    <type>s3BlobStore</type>
55    <pattern>/static-assets/s3/.*</pattern>
56    <mappings>
57      <mapping>
58        <publishingTarget>preview</publishingTarget>
59        <storeTarget>my-authoring-bucket</storeTarget>
60        <prefix>sandbox</prefix>
61      </mapping>
62      <mapping>
63        <publishingTarget>staging</publishingTarget>
64        <storeTarget>my-authoring-bucket</storeTarget>
65        <prefix>staging</prefix>
66      </mapping>
67      <mapping>
68        <publishingTarget>live</publishingTarget>
69        <storeTarget>my-delivery-bucket</storeTarget>
70      </mapping>
71    </mappings>
72    <configuration>
73      <credentials>
74        <accessKey>xxxxxxxxx</accessKey>
75        <secretKey>xxxxxxxxx</secretKey>
76      </credentials>
77      <region>us-west-1</region>
78      <pathStyleAccess>true</pathStyleAccess>
79    </configuration>
80  </blobStore>
81</blobStores>
82
83|

See Publishing Assets in External Storage for an example of using the blob stores configuration