update add single file view

This commit is contained in:
Henrique Dias committed 2016-06-11 22:34:00 +01:00
1 parent da02deb3a4
commit 8c24409f33
3 files changed
+70 -79

No files matched your search

+2 -3
View File
@@ -66,6 +66,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
if fi.IsDir {
//return f.ServeListing(w, r, file.File, c)
return http.StatusNotImplemented, nil
}
query := r.URL.Query()
@@ -78,9 +79,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
return f.Next.ServeHTTP(w, r)
}
// return f.ServeSingleFile(w, r, file, c)
return http.StatusNotImplemented, nil
return fi.ServeAsHTML(w, r, c)
case http.MethodPost:
// Upload a new file
if r.Header.Get("Upload") == "true" {