feat: local storage image thumbnail

This commit is contained in:
Noah Hsu
2022-08-11 20:32:17 +08:00
parent fda4db71bf
commit af884010d1
19 changed files with 178 additions and 61 deletions

View File

@ -51,7 +51,7 @@ func copyBetween2Storages(t *task.Task[uint64], srcStorage, dstStorage driver.Dr
}
if srcObj.IsDir() {
t.SetStatus("src object is dir, listing objs")
objs, err := operations.List(t.Ctx, srcStorage, srcObjPath)
objs, err := operations.List(t.Ctx, srcStorage, srcObjPath, model.ListArgs{})
if err != nil {
return errors.WithMessagef(err, "failed list src [%s] objs", srcObjPath)
}

View File

@ -24,7 +24,9 @@ func list(ctx context.Context, path string) ([]model.Obj, error) {
}
return nil, errors.WithMessage(err, "failed get storage")
}
objs, err := operations.List(ctx, storage, actualPath)
objs, err := operations.List(ctx, storage, actualPath, model.ListArgs{
ReqPath: path,
})
if err != nil {
log.Errorf("%+v", err)
if len(virtualFiles) != 0 {