improvements

This commit is contained in:
Henrique Dias
2016-06-27 13:22:07 +01:00
parent c5d9803bae
commit 1c55147faa
6 changed files with 357 additions and 4 deletions

View File

@@ -73,6 +73,12 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
}
return fi.ServeAsHTML(w, r, c)
case http.MethodPut:
if fi.IsDir {
return http.StatusNotAcceptable, nil
}
// Update a file
return fi.Update(w, r, c)
case http.MethodPost:
// Upload a new file
if r.Header.Get("Upload") == "true" {