diff --git a/paste.go b/paste.go index c48dc73..313637c 100644 --- a/paste.go +++ b/paste.go @@ -45,7 +45,7 @@ func createPost(w http.ResponseWriter, r *http.Request) { data := r.FormValue("stuff") h := md5.New() idHash := h.Sum([]byte(data)) - id := base64.StdEncoding.EncodeToString(idHash) + id := base64.StdEncoding.EncodeToString(idHash)[:20] err := ioutil.WriteFile(id+".txt", []byte(data), 0600) if err != nil {