Coder Social home page Coder Social logo

ghost-s3's Introduction

#UPDATE Update version 0.2.2 for Ghost 0.6.0

Ghost S3 Storage

This module allows you to store media file at Amazon S3 instead of storing at local machine, especially helpful for ghost blog hosted at heroku (no local storage). Work with latest version 0.6.0 of Ghost! (Use module version 0.1.7 for Ghost version < 0.6.0)

Installation

npm install --save ghost-s3-storage

Create storage module

Create index.js file with folder path 'content/storage/ghost-s3/index.js' (manually create folder if not exist)

'use strict';
module.exports = require('ghost-s3-storage');

Configuration

Create new Amazon S3 bucket and new IAM User with permissions allowed to put and get object from that bucket. Remember saving ACCESS_KEY and ACCESS_SECRET_KEY.

Add storage block to file config.js in each environment as below:

storage: {
    active: 'ghost-s3',
    'ghost-s3': {
        accessKeyId: 'Put_your_access_key_here',
        secretAccessKey: 'Put_your_secret_key_here',
        bucket: 'Put_your_bucket_name',
        region: 'Put_your_bucket_region',
        assetHost: 'Put_your_cdn_url*'
    }
},

Note 1 You can use assetHost config to specify S3 bucket full-url in virtual host style, path style or custom domain (http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html)

Restart app then test upload new image in blog post. Image will be store at newly S3 bucket.

Copyright & License

Copyright (c) 2015 Hoang Pham Huu [email protected]

Released under the MIT license.

ghost-s3's People

Watchers

Bogdan Goie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.