未验证 提交 484f970c 编写于 作者: G George Claghorn 提交者: GitHub

Merge pull request #33198 from henrik/patch-1

Active Storage: Explicit form field in basic example
......@@ -230,6 +230,10 @@ end
You can create a user with an avatar:
```erb
<%= form.file_field :avatar %>
```
```ruby
class SignupController < ApplicationController
def create
......@@ -479,7 +483,7 @@ directly from the client to the cloud.
2. Annotate file inputs with the direct upload URL.
```ruby
```erb
<%= form.file_field :attachments, multiple: true, direct_upload: true %>
```
3. That's it! Uploads begin upon form submission.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册