improvements

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

No files matched your search

+6
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" {