mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer: get directory metadata (#3833)
This commit is contained in:
parent
e55076c46f
commit
a05725aea6
|
@ -107,9 +107,15 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query := r.URL.Query()
|
||||||
|
|
||||||
if entry.IsDirectory() {
|
if entry.IsDirectory() {
|
||||||
if fs.option.DisableDirListing {
|
if fs.option.DisableDirListing {
|
||||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
w.WriteHeader(http.StatusForbidden)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if query.Get("metadata") == "true" {
|
||||||
|
writeJsonQuiet(w, r, http.StatusOK, entry)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if entry.Attr.Mime == "" {
|
if entry.Attr.Mime == "" {
|
||||||
|
@ -125,7 +131,6 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
query := r.URL.Query()
|
|
||||||
if query.Get("metadata") == "true" {
|
if query.Get("metadata") == "true" {
|
||||||
if query.Get("resolveManifest") == "true" {
|
if query.Get("resolveManifest") == "true" {
|
||||||
if entry.Chunks, _, err = filer.ResolveChunkManifest(
|
if entry.Chunks, _, err = filer.ResolveChunkManifest(
|
||||||
|
|
Loading…
Reference in a new issue