feat(chalice): canvas replay feature (#1684)
This commit is contained in:
parent
3448275b51
commit
7178fabbca
1 changed files with 9 additions and 3 deletions
|
|
@ -15,9 +15,15 @@ def get_canvas_presigned_urls(session_id, project_id):
|
|||
rows = cur.fetchall()
|
||||
|
||||
for i in range(len(rows)):
|
||||
rows.append(StorageClient.get_presigned_url_for_sharing(
|
||||
params = {
|
||||
"sessionId": session_id,
|
||||
"projectId": project_id,
|
||||
"recordingId": rows[i]["recording_id"]
|
||||
}
|
||||
key = config("CANVAS_PATTERN", default="%(sessionId)/%(recordingId)s.mp4") % params
|
||||
rows[i] = StorageClient.get_presigned_url_for_sharing(
|
||||
bucket=config("CANVAS_BUCKET", default=config("sessions_bucket")),
|
||||
expires_in=config("PRESIGNED_URL_EXPIRATION", cast=int, default=900),
|
||||
key=rows[i]
|
||||
))
|
||||
key=key
|
||||
)
|
||||
return rows
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue