See the multipart function definition. Line 86 deals with the actual temp file writes.
https://golang.org/src/mime/multipart/formdata.go?s=3015:3047#L34 Do note that under certain conditions, a multipart form might hold on closing and deleting the multipart files in temp. Debugging async code and judicious use of RemoveAll can help with this. https://golang.org/pkg/mime/multipart/#Form.RemoveAll On Thu, Jul 16, 2020 at 5:59 PM hao dong <hao.a.d...@gmail.com> wrote: > thx. Can you help me find the link or doc which describe the detail of " > removed once the request finished" ? > > On Thursday, July 16, 2020 at 7:32:06 PM UTC+8, Jesper Louis Andersen > wrote: >> >> They will be removed once the request finishes. The way to access them is >> usually by the FormFile method on *http.Request or to create a multipart >> reader and break it out yourself. >> >> The reason the latter is interesting is because it can avoid storing data >> you are not prepared to handle. >> >> On Thu, Jul 16, 2020 at 12:44 PM hao dong <hao....@gmail.com> wrote: >> >>> As I have learned, http server will store user-upload file on disk when >>> its size exceed 32MB. >>> I read the source code, and find out the large file to store in >>> os.TempDir(), however, after uploading a large file, I can not find the >>> file in the temp dir. >>> Cloud someone enlight me, where is the temp file ? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golan...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/0232db86-9bfb-42ae-b24b-49ea57a222ado%40googlegroups.com >>> <https://groups.google.com/d/msgid/golang-nuts/0232db86-9bfb-42ae-b24b-49ea57a222ado%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> J. >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/53d14db3-1c23-43f0-9613-1c7ac7645e96o%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/53d14db3-1c23-43f0-9613-1c7ac7645e96o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAC41hdMpgh2yZ%2BhT2LSMoUzcb-4ANT6BTkX5NS23fTdr9fn%2BFQ%40mail.gmail.com.