Skip to content
Alibaba Cloud OSS for Shrine
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/shrine/storage
test
.gitignore
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
shrine-aliyun-oss.gemspec

README.md

Shrine::Storage::AliyunOSS

Provides Alibaba cloud object storage for Shrine.

Installation

Add this line to your application's Gemfile:

gem 'shrine-aliyun-oss'

Usage

require "shrine"
require "shrine/storage/aliyun_oss"

oss_options = {
  endpoint: "oss-<region-name>.aliyuncs.com",
  access_key_id: "<access_key_id>",
  access_key_secret: "<access_key_secret>",
  bucket: "<bucket-name>"
}

Shrine.storages = {
  cache: Shrine::Storage::AliyunOSS.new(prefix: "cache", **oss_options),
  store: Shrine::Storage::AliyunOSS.new(prefix: "store", **oss_options)
}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zillou/shrine-aliyun-oss.

License

You can’t perform that action at this time.