feat: fix expiration
This commit is contained in:
@@ -194,7 +194,7 @@ func (ctl *posts) Play(ctx fiber.Ctx, id int64, user *model.Users) (*PlayUrl, er
|
||||
log.WithError(err).Errorf("medias GetByID err: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
url, err := ctl.oss.GetSignedUrl(ctx.Context(), media.Path)
|
||||
url, err := ctl.oss.GetSignedUrl(ctx.Context(), media.Path, ali.WithExpire(time.Second*time.Duration(media.Metas.Data.Duration+30)))
|
||||
if err != nil {
|
||||
log.WithError(err).Errorf("media GetSignedUrl err: %v", err)
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user