fix: use proper signed URL generation for accessible video preview

The generate_signed_url() was called with expiration=3600 as an integer,
but GCS expects a datetime or timedelta. Now uses gcs_service.get_signed_url()
which properly calculates the expiration timestamp.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
michael 2026-01-11 09:28:51 -06:00
parent 81d4e6a3cc
commit 65a7404c87

View file

@ -1520,8 +1520,11 @@ async def get_accessible_video_edit_state(
accessible_video_url = None
if accessible_video_gcs:
blob_path = accessible_video_gcs.replace(f"gs://{settings.gcs_bucket}/", "")
blob = gcs_service.bucket.blob(blob_path)
accessible_video_url = blob.generate_signed_url(expiration=3600)
try:
accessible_video_url = await gcs_service.get_signed_url(blob_path, expiration_hours=1)
except HTTPException:
# File may not exist yet
accessible_video_url = None
# Convert to response format
return AccessibleVideoEditStateResponse(