method

generate_url

generate_url(key, expires_in:, filename:, content_type:, disposition:)
private

No documentation available.

# File activestorage/lib/active_storage/service/disk_service.rb, line 114
      def generate_url(key, expires_in,, filename,, content_type,, disposition))
        content_disposition = content_disposition_with(type: disposition, filename: filename)
        verified_key_with_expiration = ActiveStorage.verifier.generate(
          {
            key: key,
            disposition: content_disposition,
            content_type: content_type,
            service_name: name
          },
          expires_in: expires_in,
          purpose: :blob_key
        )

        current_uri = URI.parse(current_host)

        url_helpers.rails_disk_service_url(verified_key_with_expiration,
          protocol: current_uri.scheme,
          host: current_uri.host,
          port: current_uri.port,
          filename: filename
        )
      end