Sha256: 2696ea1cd8b9839f400303d96db3429ec252c6f2c7cc963aee721ea78a99a486

Contents?: true

Size: 982 Bytes

Versions: 1

Compression:

Stored size: 982 Bytes

Contents

# CarrierWave for Netease Object Storage Service(NOS)

This gem adds support for [Netease Object Storage Service](https://c.163.com/product/nos) to [CarrierWave](https://github.com/jnicklas/carrierwave/)

> NOTE: 此 Gem 是一个 CarrierWave 的组件,你需要配合 CarrierWave 一起使用
>
> PS: 更多关于网易云对象存储服务的介绍请去[网易蜂巢官网](https://c.163.com/)查看


## Installation

```ruby
gem 'carrierwave-nos'
```

## Configuration

在Rails工程目录下创建文件 `config/initializers/carrierwave.rb` 并填入下面的代码,修改对应的配置:

```ruby
CarrierWave.configure do |config|
  config.storage        = :nos
  config.nos_access_key = ''
  config.nos_secret_key = ''
  # 你需要在 NOS 上面提前创建一个 Bucket
  config.nos_bucket     = ''
  config.nos_endpoint   = 'nos-eastchina1.126.net'
end
```

## Usage

参照单元测试`nos_spec.rb`

## License

[MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carrierwave-nos-0.1.0 README.md