mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
fix(fs): return FOLDER type for directories in fs/get responses (#3114)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user