Sha256: 08b23f773c7b54414c42c424b78daabac3b26b197f9397ae694a871bed94f25b

Contents?: true

Size: 551 Bytes

Versions: 4

Compression:

Stored size: 551 Bytes

Contents

require 'aliyun/oss'
require 'carrierwave'
require 'uri'

module CarrierWave
  module Storage
    class Aliyun < Abstract
      def store!(file)
        f = AliyunFile.new(uploader, self, uploader.store_path)
        headers = {
          content_type: file.content_type,
          content_disposition: uploader.try(:content_disposition)
        }

        f.store(::File.open(file.file), headers)
        f
      end

      def retrieve!(identifier)
        AliyunFile.new(uploader, self, uploader.store_path(identifier))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
carrierwave-aliyun-0.9.0 lib/carrierwave/storage/aliyun.rb
carrierwave-aliyun-0.8.1 lib/carrierwave/storage/aliyun.rb
carrierwave-aliyun-0.7.1 lib/carrierwave/storage/aliyun.rb
carrierwave-aliyun-0.7.0 lib/carrierwave/storage/aliyun.rb