Clarify ActiveStorage::Service#url docs [ci skip]

* Public services don’t respect `:disposition`, `:filename`, or `:content_type`.
* `:expires_in` is optional.
This commit is contained in:
Santiago Bartesaghi 2020-09-12 13:47:33 -03:00 committed by GitHub
parent 99a0254eff
commit 4a78dcb326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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