Skip to content

Asset Sources

Ian edited this page Aug 30, 2016 · 1 revision

Amazon S3, Google Cloud Storage and Rackspace Cloud Files must be valid for import to work.

{
    "sources": [{
        "name": "Media",
        "handle": "media",
        "type": "Local",
        "settings": {
            "path": "media",
            "url": "/media",
            "publicURLs": true
        },
        "fieldLayout": {
            "Properties": [ // Can be named anything this is the Tab Title
                // Use field handles below to specify what fields go in this tab
                "altText",
                "caption"
            ]
        },
        "requiredFields": [ // Only support in versions higher than 1.0.2
            "altText"
        ]
    }, {
        "name": "Media",
        "handle": "media",
        "type": "S3", // or "GoogleCloud"
        "settings": {
            "keyId": "__ACCESS_KEY_ID__",
            "secret": "__SECRET_ACCESS_KEY__",
            "bucket": "__BUCKET__",
            "subfolder": "",
            "urlPrefix": "__URL_PREFIX__",
            "expiresAmount": "",
            "expiresPeriod": "seconds" // or "minutes" or "hours" or "days" or "month" or "years"
        },
        "fieldLayout": {
            "Properties": [ // Can be named anything this is the Tab Title
                // Use field handles below to specify what fields go in this tab
                "altText",
                "caption"
            ]
        },
        "requiredFields": [ // Only support in versions higher than 1.0.2
            "altText"
        ]
    }, {
        "name": "Media",
        "handle": "media",
        "type": "Rackspace",
        "settings": {
            "username": "__USERNAME__",
            "apiKey": "__API_KEY__",
            "region": "__REGION__",
            "container": "__CONTAINER__",
            "subfolder": "",
            "urlPrefix": "__URL_PREFIX__"
        },
        "fieldLayout": {
            "Properties": [ // Can be named anything this is the Tab Title
                // Use field handles below to specify what fields go in this tab
                "altText",
                "caption"
            ]
        },
        "requiredFields": [ // Only support in versions higher than 1.0.2
            "altText"
        ]
    }]
}
Clone this wiki locally