Skip to content

Commit

Permalink
feat(chalice): canvas replay feature (openreplay#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahayk authored Nov 20, 2023
1 parent c2fa62b commit 23d6e28
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions api/chalicelib/core/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 23d6e28

Please sign in to comment.