GithubHelp home page GithubHelp logo

hayeah / carrierwave-aliyun Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huacnlee/carrierwave-aliyun

0.0 3.0 0.0 1.12 MB

阿里云 OSS Ruby 上传组件,基于 Carrierwave

Home Page: http://oss.aliyun.com

Ruby 100.00%

carrierwave-aliyun's Introduction

CarrierWave for Aliyun OSS

This gem adds support for Aliyun OSS to CarrierWave

Installation

gem install carrierwave-aliyun

Using Bundler

gem 'rest-client'
gem 'carrierwave-aliyun'

Configuration

创建这么个脚本 config/initializes/carrierwave.rb 填入下面的代码,并修改对应的配置:

CarrierWave.configure do |config|
  config.storage = :aliyun
  config.aliyun_access_id = "xxxxxx"
  config.aliyun_access_key = 'xxxxxx'
  # 你需要在 Aliyum OSS 上面提前创建一个 Bucket
  config.aliyun_bucket = "simple"
  # 是否使用内部连接,true - 使用 Aliyun 局域网的方式访问  false - 外部网络访问
  config.aliyun_internal = true
end

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.