Skip to content

Commit

Permalink
feat: add thumbnail to fs/get api (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxiexie authored Mar 23, 2023
1 parent b2a5110 commit c6af22b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/handles/fsread.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ func FsGet(c *gin.Context) {
related = filterRelated(sameLevelFiles, obj)
}
parentMeta, _ := op.GetNearestMeta(parentPath)
thumb, _ := model.GetThumb(obj)
common.SuccessResp(c, FsGetResp{
ObjResp: ObjResp{
Name: obj.GetName(),
Expand All @@ -301,6 +302,7 @@ func FsGet(c *gin.Context) {
Modified: obj.ModTime(),
Sign: common.Sign(obj, parentPath, isEncrypt(meta, reqPath)),
Type: utils.GetFileType(obj.GetName()),
Thumb: thumb,
},
RawURL: rawURL,
Readme: getReadme(meta, reqPath),
Expand Down

0 comments on commit c6af22b

Please sign in to comment.