feat: add expiration field for Link

This commit is contained in:
Noah Hsu
2022-06-13 15:39:47 +08:00
parent 3e8f36e9f3
commit e16ab876aa
4 changed files with 37 additions and 15 deletions

View File

@ -52,7 +52,11 @@ func Get(ctx context.Context, account driver.Driver, path string) (driver.FileIn
// Link get link, if is a url. show have an expiry time
func Link(ctx context.Context, account driver.Driver, path string, args driver.LinkArgs) (*driver.Link, error) {
return account.Link(ctx, path, args)
link, err := account.Link(ctx, path, args)
if err != nil {
return nil, errors.WithMessage(err, "failed get link")
}
return link, nil
}
func MakeDir(ctx context.Context, account driver.Driver, path string) error {