fix(local): incorrect path of thumbnail (for 6453ae0)

This commit is contained in:
Noah Hsu
2023-01-16 20:02:30 +08:00
parent 8b523fab8b
commit 9d9377f65d
3 changed files with 4 additions and 4 deletions

View File

@ -69,9 +69,9 @@ func (d *Local) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([
}
thumb := ""
if d.Thumbnail && utils.GetFileType(f.Name()) == conf.IMAGE {
thumb = common.GetApiUrl(nil) + stdpath.Join("/d", utils.GetFullPath(d.MountPath, fullPath), f.Name())
thumb = common.GetApiUrl(nil) + stdpath.Join("/d", args.ReqPath, f.Name())
thumb = utils.EncodePath(thumb, true)
thumb += "?type=thumb&sign=" + sign.Sign(stdpath.Join(utils.GetFullPath(d.MountPath, fullPath), f.Name()))
thumb += "?type=thumb&sign=" + sign.Sign(stdpath.Join(args.ReqPath, f.Name()))
}
isFolder := f.IsDir() || isSymlinkDir(f, fullPath)
var size int64