0.0
No commit activity in last 3 years
No release in over 3 years
NOS support for CarrierWave.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

CarrierWave for Netease Object Storage Service(NOS)

This gem adds support for Netease Object Storage Service to CarrierWave

NOTE: 此 Gem 是一个 CarrierWave 的组件,你需要配合 CarrierWave 一起使用

PS: 更多关于网易云对象存储服务的介绍请去网易蜂巢官网查看

Installation

gem 'carrierwave-nos'

Configuration

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

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.