mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-01-07 12:17:02 +08:00
feat: s3 AccessURL
This commit is contained in:
parent
7bfffacaa3
commit
c7c86a4a96
@ -162,6 +162,7 @@ func (t *thirdServer) AccessURL(ctx context.Context, req *third.AccessURLReq) (*
|
|||||||
opt.Image.Format = req.Query["format"]
|
opt.Image.Format = req.Query["format"]
|
||||||
opt.Image.Width, _ = strconv.Atoi(req.Query["width"])
|
opt.Image.Width, _ = strconv.Atoi(req.Query["width"])
|
||||||
opt.Image.Height, _ = strconv.Atoi(req.Query["height"])
|
opt.Image.Height, _ = strconv.Atoi(req.Query["height"])
|
||||||
|
log.ZDebug(ctx, "AccessURL image", "name", req.Name, "option", opt.Image)
|
||||||
case "video":
|
case "video":
|
||||||
opt.Video = &s3.Video{}
|
opt.Video = &s3.Video{}
|
||||||
opt.Video.Format = req.Query["format"]
|
opt.Video.Format = req.Query["format"]
|
||||||
@ -169,6 +170,7 @@ func (t *thirdServer) AccessURL(ctx context.Context, req *third.AccessURLReq) (*
|
|||||||
opt.Video.Height, _ = strconv.Atoi(req.Query["height"])
|
opt.Video.Height, _ = strconv.Atoi(req.Query["height"])
|
||||||
millisecond, _ := strconv.Atoi(req.Query["time"])
|
millisecond, _ := strconv.Atoi(req.Query["time"])
|
||||||
opt.Video.Time = time.Millisecond * time.Duration(millisecond)
|
opt.Video.Time = time.Millisecond * time.Duration(millisecond)
|
||||||
|
log.ZDebug(ctx, "AccessURL video", "name", req.Name, "option", opt.Video)
|
||||||
default:
|
default:
|
||||||
return nil, errs.ErrArgs.Wrap("invalid query type")
|
return nil, errs.ErrArgs.Wrap("invalid query type")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user