Sha256: fc0334b984f276ba52ab3344135d3228bfdbd3d0a9408d7427ce38f61d41348e

Contents?: true

Size: 946 Bytes

Versions: 3

Compression:

Stored size: 946 Bytes

Contents

module CarrierWave
  module Ucloud
    module Configuration
      extend ActiveSupport::Concern

      included do
        add_config :ucloud_public_key
        add_config :ucloud_private_key
        # 是否使用公开url读取(其实跟设置的bucket是否私密有关),需要手工指定,可在Uploader覆写
        add_config :ucloud_public_read
        # 公开bucket的配置
        add_config :ucloud_public_bucket
        add_config :ucloud_public_bucket_host
        add_config :ucloud_public_cdn_host
        # 私有bucket的配置
        add_config :ucloud_private_bucket
        add_config :ucloud_private_bucket_host
        add_config :ucloud_private_cdn_host
        # 如果是私密的bucket,生成url的有效时间
        add_config :ucloud_private_expire_seconds

        configure do |config|
          config.storage_engines[:ucloud] = 'CarrierWave::Storage::Ucloud'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
carrierwave_ucloud-0.1.4 lib/carrierwave/ucloud/configuration.rb
carrierwave_ucloud-0.1.3 lib/carrierwave/ucloud/configuration.rb
carrierwave_ucloud-0.1.2 lib/carrierwave/ucloud/configuration.rb