diff --git a/lib/carrierwave/storage/fog.rb b/lib/carrierwave/storage/fog.rb index 5ec5c5266..24bdef084 100644 --- a/lib/carrierwave/storage/fog.rb +++ b/lib/carrierwave/storage/fog.rb @@ -177,7 +177,7 @@ def attributes ## # Return a temporary authenticated url to a private file, if available - # Only supported for AWS, Rackspace, Google and AzureRM providers + # Only supported for AWS, Rackspace, Google, AzureRM and Aliyun providers # # === Returns # @@ -186,7 +186,7 @@ def attributes # [NilClass] no authenticated url available # def authenticated_url(options = {}) - if ['AWS', 'Google', 'Rackspace', 'OpenStack', 'AzureRM'].include?(@uploader.fog_credentials[:provider]) + if ['AWS', 'Google', 'Rackspace', 'OpenStack', 'AzureRM', 'Aliyun'].include?(@uploader.fog_credentials[:provider]) # avoid a get by using local references local_directory = connection.directories.new(:key => @uploader.fog_directory) local_file = local_directory.files.new(:key => path) diff --git a/spec/storage/fog_helper.rb b/spec/storage/fog_helper.rb index 455698a6b..0e4040ffe 100644 --- a/spec/storage/fog_helper.rb +++ b/spec/storage/fog_helper.rb @@ -438,7 +438,7 @@ class FogSpec#{fog_credentials[:provider]}Uploader < CarrierWave::Uploader::Base end it "should have an authenticated_url" do - if ['AWS', 'Rackspace', 'Google', 'OpenStack', 'AzureRM'].include?(@provider) + if ['AWS', 'Rackspace', 'Google', 'OpenStack', 'AzureRM', 'Aliyun'].include?(@provider) expect(@fog_file.authenticated_url).not_to be_nil end end