Allows you to store uploaded images in Azure blob storage instead of on the local file store.
Requires Ghost 0.6.0 or higher!
with 💜,
—@helloitsdan
- Create a
storagefolder in your Ghost content root, eg./var/www/ghost/content/storage
- Clone this repo into your
storagefolder - The module will be available under whatever folder name you checked out this repo to, which is
ghost-azure-storeby default
- Run
npm install ghost-azure-storagefrom your Ghost root
Note that upgrading Ghost will overwrite your local package.json, so --saveing the module will get lost down the line
- Create a node script in your
storagefolder which exports theghost-azure-storagemodule, like so:
module.exports = require("ghost-azure-store");
- The module will be available under whatever filename you used for the above script. eg.
storage/ghost-azure-store.jswill be available asghost-azure-store
Add a storage block to Ghost's config, as below. Make sure you change ghost-azure-store to the name you chose above!
storage :{
active: 'ghost-azure-store',
'ghost-azure-store': {
key: "{azure storage key}",
storage: "myblogstore",
container: "my-container"
}
},
Using the above options, images would be uploaded to http://myblogstore.blob.core.windows.net/container/. If you want to give your storage a custom domain name,
you can also set the baseURL config parameter to something along the lines of http://assets.mylovelyblog.com and the URLs stored in Ghost's database will
use that instead.