aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2019-12-11 07:45:14 -0800
committerGitHub <noreply@github.com>2019-12-11 07:45:14 -0800
commit2449945b83065b4c337d6d6391763221a5ff22bd (patch)
tree49718e6f165a82326ab2416bb548e5ae7979fd0b
parent40ff4eea14bc03a962c78f14ec4e98b49315bad2 (diff)
parent9e45702334cb6b0689eff4c942e7d03c20377c90 (diff)
downloadseaweedfs-2449945b83065b4c337d6d6391763221a5ff22bd.tar.xz
seaweedfs-2449945b83065b4c337d6d6391763221a5ff22bd.zip
Merge pull request #1153 from LazyDBA247-Anyvision/master
Filer: Enable delete entries without flag volume
-rw-r--r--weed/server/filer_server_handlers_write.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go
index f94d83347..3f60ea8d4 100644
--- a/weed/server/filer_server_handlers_write.go
+++ b/weed/server/filer_server_handlers_write.go
@@ -280,12 +280,14 @@ func (fs *FilerServer) uploadToVolumeServer(r *http.Request, u *url.URL, auth se
// curl -X DELETE http://localhost:8888/path/to
// curl -X DELETE http://localhost:8888/path/to?recursive=true
// curl -X DELETE http://localhost:8888/path/to?recursive=true&ignoreRecursiveError=true
+// curl -X DELETE http://localhost:8888/path/to?recursive=true&shouldDeleteChunks=false&shouldDeleteChunks=false
func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
isRecursive := r.FormValue("recursive") == "true"
ignoreRecursiveError := r.FormValue("ignoreRecursiveError") == "true"
+ shouldDeleteChunks := !(r.FormValue("shouldDeleteChunks") == "false")
- err := fs.filer.DeleteEntryMetaAndData(context.Background(), filer2.FullPath(r.URL.Path), isRecursive, ignoreRecursiveError, true)
+ err := fs.filer.DeleteEntryMetaAndData(context.Background(), filer2.FullPath(r.URL.Path), isRecursive, ignoreRecursiveError, shouldDeleteChunks)
if err != nil {
glog.V(1).Infoln("deleting", r.URL.Path, ":", err.Error())
writeJsonError(w, r, http.StatusInternalServerError, err)