X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;ds=sidebyside;f=gocheese.go;h=9b74ee7d5cf729b6f6f0faf09fb108b26ca896bc;hb=2b83ac5db8551f70614672b2d326272b35d064d3;hp=2245d5cafc5743f6b1a6a73d9464497437c0c5cb;hpb=5efa36bbdfbb5a6e8fd1bba040f0cbc7a42c3493;p=gocheese.git diff --git a/gocheese.go b/gocheese.go index 2245d5c..9b74ee7 100644 --- a/gocheese.go +++ b/gocheese.go @@ -154,7 +154,7 @@ func refreshDir(w http.ResponseWriter, r *http.Request, dir, filenameGet string) } defer resp.Body.Close() hasher := sha256.New() - dst, err := ioutil.TempFile(filepath.Join(*root, dir), "") + dst, err := TempFile(filepath.Join(*root, dir)) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return false @@ -322,7 +322,7 @@ func serveUpload(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - dst, err = ioutil.TempFile(dirPath, "") + dst, err = TempFile(dirPath) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return