def upload_signature
      @upload_signature ||=
        Base64.encode64(
          OpenSSL::HMAC.digest(
            OpenSSL::Digest::SHA1.new,
            options[:secret_access_key],
            self.policy_document
          )
        ).gsub(/\n/, '')
    end
def upload_signature
      @upload_signature ||=
        Base64.encode64(
          OpenSSL::HMAC.digest(
            OpenSSL::Digest::SHA1.new,
            options[:secret_access_key],
            self.policy_document
          )
        ).gsub(/\n/, '')
    end
sign our request by Base64 encoding the policy document.