Skip to content

Commit ebd552d

Browse files
Jimmy99jameswpm
authored andcommitted
Update 04.5.md
Typographical errors and improved readability
1 parent add89a9 commit ebd552d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

en/04.5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func upload(w http.ResponseWriter, r *http.Request) {
6666
```
6767

6868

69-
As you can see, we need to call `r.ParseMultipartForm` for uploading files. The function `maxMemory` argument. After you call `ParseMultipartForm`, the file will be saved in the server memory with `maxMemory` size. If the file size is larger than `maxMemory`, the rest of the data will be saved in a system temporary file. You can use `r.FormFile` to get the file handle and use `io.Copy` to save to your file system.
69+
As you can see, we need to call `r.ParseMultipartForm` for uploading files. The function ParseMultipartForm takes the `maxMemory` argument. After you call `ParseMultipartForm`, the file will be saved in the server memory with `maxMemory` size. If the file size is larger than `maxMemory`, the rest of the data will be saved in a system temporary file. You can use `r.FormFile` to get the file handle and use `io.Copy` to save to your file system.
7070

7171
You don't need to call `r.ParseForm` when you access other non-file fields in the form because Go will call it when it's necessary. Also, calling `ParseMultipartForm` once is enough -multiple calls make no difference.
7272

0 commit comments

Comments
 (0)