method

url

rails latest stable - Class: ActiveStorage::Service::S3Service

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

url(key, expires_in:, filename:, disposition:, content_type:)
public

No documentation available.

# File activestorage/lib/active_storage/service/s3_service.rb, line 69
    def url(key, expires_in,, filename,, disposition,, content_type))
      instrument :url, key: key do |payload|
        generated_url = object_for(key).presigned_url :get, expires_in: expires_in.to_i,
          response_content_disposition: content_disposition_with(type: disposition, filename: filename),
          response_content_type: content_type

        payload[:url] = generated_url

        generated_url
      end
    end