fix(fs): return FOLDER type for directories in fs/get responses (#3114)

This commit is contained in:
ZRHan
2026-09-24 01:26:42 +08:00
committed by GitHub
parent b51d1c8284
commit 6c6009109f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ func FsGet(c *gin.Context, req *FsGetReq, user *model.User) {
HashInfoStr: obj.GetHash().String(),
HashInfo: obj.GetHash().Export(),
Sign: common.Sign(obj, parentPath, isEncrypt(meta, reqPath)),
Type: utils.GetFileType(obj.GetName()),
Type: utils.GetObjType(obj.GetName(), obj.IsDir()),
Thumb: thumb,
MountDetails: mountDetails,
},
+1 -1
View File
@@ -54,7 +54,7 @@ func SharingGet(c *gin.Context, req *FsGetReq) {
HashInfoStr: obj.GetHash().String(),
HashInfo: obj.GetHash().Export(),
Sign: "",
Type: utils.GetFileType(obj.GetName()),
Type: utils.GetObjType(obj.GetName(), obj.IsDir()),
Thumb: thumb,
},
RawURL: url,
+1 -1
View File
@@ -85,7 +85,7 @@ func (s *Server) callFSGet(c *gin.Context, raw json.RawMessage) (any, *rpcError)
Created: obj.CreateTime(),
Sign: common.Sign(obj, parentPath, isEncrypt(meta, reqPath)),
Thumb: thumb,
Type: utils.GetFileType(obj.GetName()),
Type: utils.GetObjType(obj.GetName(), obj.IsDir()),
HashInfoStr: obj.GetHash().String(),
HashInfo: obj.GetHash().Export(),
MountDetails: mountDetails,