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:
parent
99a0254eff
commit
4a78dcb326
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user