Cloudfiles storage for Imagine
Cloudfiles storage for Imagine.
If you haven't already done so, make sure to install
your Imagine folder:
$ npm install imagine-cloudfiles
Then place something similar to the following into your
config.json file for
"storage": "imagine-cloudfiles""imagine-cloudfiles":"user": "USER""key": "KEY""containerPrefix": "imagine-assets""containerHashLength": 4
KEY with your Cloudfiles account data.
In order to sufficiently distribute images across containers in Cloudfiles
without user input, Imagine-Cloudfiles places images into containers based on
an MD5 hash of the image name that is trimmed to the size of the
containerHashLength and prefixed with the
containerPrefix. Simply reverse
this container hash operation to find which container an image file resides.
containerHashLength can be changed to meet your needs.
You can change the default Cloudfiles host (
adding the following to the
imagine-cloudfiles section of your config:
If you're using Rackspace Cloud Servers, be sure to turn on ServiceNet for
fast, unmetered access to Cloudfiles by adding this to the
section of your config:
Imagine-Cloudfiles is distributed under the MIT License. See LICENSE for more details.