mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 03:15:19 +08:00
feat: add thumbnail to fs/get api (#3927)
This commit is contained in:
@@ -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(),
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user