class CarrierWave::Storage::Aliyun
Public Instance Methods
cache!(new_file)
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 21 def cache!(new_file) f = AliyunFile.new(uploader, self, uploader.cache_path) headers = { content_type: new_file.content_type, content_disposition: uploader.try(:content_disposition) } f.store(new_file, headers) f end
delete_dir!(path)
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 36 def delete_dir!(path) # do nothing, because there's no such things as 'empty directory' end
retrieve!(identifier)
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 17 def retrieve!(identifier) AliyunFile.new(uploader, self, uploader.store_path(identifier)) end
retrieve_from_cache!(identifier)
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 32 def retrieve_from_cache!(identifier) AliyunFile.new(uploader, self, uploader.cache_path(identifier)) end
store!(new_file)
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 6 def store!(new_file) f = AliyunFile.new(uploader, self, uploader.store_path) headers = { content_type: new_file.content_type, content_disposition: uploader.try(:content_disposition) } f.store(new_file, headers) f end
Private Instance Methods
bucket()
click to toggle source
# File lib/carrierwave/storage/aliyun.rb, line 42 def bucket @bucket ||= CarrierWave::Aliyun::Bucket.new(uploader) end