Provides Alibaba cloud object storage for Shrine.
Add this line to your application's Gemfile:
gem 'shrine-aliyun-oss'
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)
}
Bug reports and pull requests are welcome on GitHub at https://github.com/zillou/shrine-aliyun-oss.