lib/fog/azurerm/models/storage/file.rb in gitlab-fog-azure-rm-1.8.0 vs lib/fog/azurerm/models/storage/file.rb in gitlab-fog-azure-rm-1.9.0

- old
+ new

@@ -1,10 +1,10 @@ require 'mime/types' module Fog - module Storage - class AzureRM + module AzureRM + class Storage # This class is giving implementation of create/save and # delete/destroy for Blob. class File < Fog::Model include Fog::AzureRM::Utilities::General @@ -147,11 +147,11 @@ # @param target_directory_key [String] # @param target_file_key [String] # @param options [Hash] options for copy_object method # @option options [Integer] timeout Sets to raise a TimeoutError if the copy does not finish in timeout seconds. # - # @return [Fog::Storage::AzureRM::File] New File. + # @return [Fog::AzureRM::Storage::File] New File. # def copy(target_directory_key, target_file_key, options = {}) requires :directory, :key timeout = options.delete(:timeout) @@ -250,9 +250,12 @@ def normalize_options(options) # AWS S3 and Google Cloud Storage pass response-content-disposition # as a query string, while Azure needs the content_disposition parameter # to generate a SAS token. options[:content_disposition] ||= options.dig(:query, 'response-content-disposition') + options[:content_type] ||= options.dig(:query, 'response-content-type') + options = options.dup + options.delete(:query) options end # Upload blob def save_blob(options)