<commit_before>package main

import (
	"crypto/md5"
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
	"strconv"
	"text/template"
	"time"
)

const downloadDir1 = "//home//ubuntu//upload//"

// upload logic
func upload1Handler(w http.ResponseWriter, r *http.Request) {
	fmt.Println("upload 1 method:", r.Method)
	if r.Method == "GET" {
		fmt.Println("upload 1 GET:")
		crutime := time.Now().Unix()
		h := md5.New()
		io.WriteString(h, strconv.FormatInt(crutime, 10))
		token := fmt.Sprintf("%x", h.Sum(nil))

		t, _ := template.ParseFiles("upload1.html")
		t.Execute(w, token)
	} else {
		log.Printf("Received files upload1")
		r.ParseMultipartForm(32 << 20)
		file, handler, err := r.FormFile("uploadfile")
		if err != nil {
			log.Printf("Error Uploading File")
			fmt.Println(err)
			return
		}
		log.Printf("File : %s", file)
		defer file.Close()
		fmt.Fprintf(w, "%v", handler.Header)
		f, err := os.OpenFile(downloadDir1+handler.Filename, os.O_WRONLY|os.O_CREATE, 0666)
		if err != nil {
			log.Printf("Error Uploading File")
			fmt.Println(err)
			return
		}
		defer f.Close()
		io.Copy(f, file)
	}
}
<commit_msg>Test multi upload<commit_after>package main

import (
	"crypto/md5"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"strconv"
	"text/template"
	"time"
)

const downloadDir1 = "//home//ubuntu//upload//"

const maxMemory = 1 * 1024 * 1024

// upload logic
func upload1Handler(w http.ResponseWriter, r *http.Request) {
	fmt.Println("upload 1 method:", r.Method)
	if r.Method == "GET" {
		fmt.Println("upload 1 GET:")
		crutime := time.Now().Unix()
		h := md5.New()
		io.WriteString(h, strconv.FormatInt(crutime, 10))
		token := fmt.Sprintf("%x", h.Sum(nil))

		t, _ := template.ParseFiles("upload1.html")
		t.Execute(w, token)
	} else {
		if err := r.ParseMultipartForm(maxMemory); err != nil {
			log.Println(err)
			http.Error(w, err.Error(), http.StatusForbidden)
		}

		for key, value := range r.MultipartForm.Value {
			fmt.Fprintf(w, "%s:%s ", key, value)
			log.Printf("%s:%s", key, value)
		}

		for _, fileHeaders := range r.MultipartForm.File {
			for _, fileHeader := range fileHeaders {
				file, _ := fileHeader.Open()
				path := fmt.Sprintf("%s/%s", downloadDir1, fileHeader.Filename)
				buf, _ := ioutil.ReadAll(file)
				ioutil.WriteFile(path, buf, os.ModePerm)
			}
		}
	}

}

{'fraction_non_alphanumeric': 0.17976552323056882, 'fraction_numerical': 0.016500217108119844, 'mean_word_length': 3.589641434262948, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '852206', 'n_tokens_mistral': 1004, 'n_tokens_neox': 907, 'n_words': 184}