Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions functions/http/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func UploadFile(w http.ResponseWriter, r *http.Request) {
// The whole request body is parsed and up to a total of maxMemory bytes of
// its file parts are stored in memory, with the remainder stored on
// disk in temporary files.

// Note that any files saved during a particular invocation may not
// persist after the current invocation completes; persistent files
// should be stored elsewhere, such as in a Cloud Storage bucket.
if err := r.ParseMultipartForm(maxMemory); err != nil {
http.Error(w, "Unable to parse form", http.StatusBadRequest)
log.Printf("Error parsing form: %v", err)
Expand Down