未验证 提交 4a78dcb3 编写于 作者: S Santiago Bartesaghi 提交者: GitHub

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

* Public services don’t respect `:disposition`, `:filename`, or `:content_type`.
* `:expires_in` is optional.
上级 99a0254e
......@@ -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 =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册