Flowdock
method

generate_url

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: DiskService
generate_url(key, expires_in:, filename:, content_type:, disposition:) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.