Spaces:
Running
Running
Commit History
-
Resolve the edit-key niche from the DB so the editor finds clips on R2
R2 edit keys embed the niche (edits/<niche>/<render_id>/clip_NN.mp4) but every editor call site only holds a render id, so load_manifest/replace_clip derived a different key than save_clips wrote and found nothing. media.niche_for() looks the niche up once per render and the key builders fall back to it, fixing all six call sites at the choke point. Misses aren't cached, since the edited-render path saves clips before inserting its row. Also adds R2_ENDPOINT_URL (give the endpoint directly instead of an account id), scripts/check_r2.py to verify credentials plus the custom domain, and scripts/migrate_media_to_r2.py to lift generated_videos/ into R2 and repoint renders.file_name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>5812e2e