diff --git a/server/handles/fsread.go b/server/handles/fsread.go index 856f46e54..073d02272 100644 --- a/server/handles/fsread.go +++ b/server/handles/fsread.go @@ -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, }, diff --git a/server/handles/sharing.go b/server/handles/sharing.go index ded8a20df..221bc1277 100644 --- a/server/handles/sharing.go +++ b/server/handles/sharing.go @@ -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, diff --git a/server/mcp/fs_get.go b/server/mcp/fs_get.go index 550cc036f..a7a7e58ce 100644 --- a/server/mcp/fs_get.go +++ b/server/mcp/fs_get.go @@ -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,