|
|
@@ -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 { |
|
|
|