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

pull/3074/head
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

View File

@ -23,7 +23,7 @@ func list(ctx context.Context, path string, refresh ...bool) ([]model.Obj, error
var _objs []model.Obj
if storage != nil {
_objs, err = op.List(ctx, storage, actualPath, model.ListArgs{
//ReqPath: path,
ReqPath: path,
}, refresh...)
if err != nil {
log.Errorf("%+v", err)

View File

@ -7,7 +7,7 @@ import (
)
type ListArgs struct {
//ReqPath string
ReqPath string
}
type LinkArgs struct {