class ActiveStorage::Service

def url(key, **options)

the amount of seconds the URL will be valid for, specified in +expires_in+.
+filename+, and +content_type+ that you wish the file to be served with on request. Additionally, you can also provide
short-lived URL for private files. For private files you can provide the +disposition+ (+:inline+ or +:attachment+),
Returns the URL for the file at the +key+. This returns a permanent URL for public files, and returns a
def url(key, **options)
  instrument :url, key: key do |payload|
    generated_url =
      if public?
        public_url(key, **options)
      else
        private_url(key, **options)
      end
    payload[:url] = generated_url
    generated_url
  end
end