add "weed copy" command to copy files to filer
This commit is contained in:
@@ -27,3 +27,15 @@ func (fs *FilerServer) moveHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
}
|
||||
|
||||
func (fs *FilerServer) registerHandler(w http.ResponseWriter, r *http.Request) {
|
||||
path := r.FormValue("path")
|
||||
fileId := r.FormValue("fileId")
|
||||
err := fs.filer.CreateFile(path, fileId)
|
||||
if err != nil {
|
||||
glog.V(4).Infof("register %s to %s error: %v", fileId, path, err)
|
||||
writeJsonError(w, r, http.StatusInternalServerError, err)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user