Skip to content

Footage: a file too big for the connection comes by its shared link - #59

Merged
pallaoro merged 1 commit into
mainfrom
big-files-shared-link
Oct 10, 2026
Merged

pallaoro merged 1 commit into
mainfrom
big-files-shared-link

Conversation

@pallaoro

Copy link
Copy Markdown
Member

Found while retrying a real shoot's failed interviews: 11 of the 15 clips that ever took the copy route failed with Stream's "The source returned an invalid or inconsistent response while downloading the video" (7 Day 2 interviews, 2 Day 3 interviews, 2 static cams).

Evidence (curl against Drive's download endpoint):

  • Original (shared with the link): HEAD → 200 video/mp4, content-length: 15108478104; Range: 0-0 → 206 bytes 0-0/15108478104.
  • Fresh copy made the app's way (COPY_FILE_ADVANCED + anyone/reader): HEAD → 200 text/html, content-length: 0, every check for 8+ minutes; ranged GETs → 206 with the right bytes. Same result for copies of a 9.66 GB file that once imported and one that didn't.

Change:

  • startImport: connection download first; when it can't hand the file over, link_only = 2 and the original's shared link (existing probe, quota page detection and waits). The copy step is gone (driveCopyForImport, driveCreateFolder, the copy folder setting, DriveSource.copy).
  • Clips waiting on the shared link's limit are un-delayed only when they'd go through the connection (link_only = 0, was < 2).
  • Leftover copies (copy_id) are still deleted once their import is over or with the project.
  • agent.md says so.

e2e 12: the too-big file imports from the original's shared link in the same delivery, no copy/permission/folder action is ever called, and a leftover copy is deleted after one refused delete.

Checks: tsc, 162 unit tests, end to end ALL OK, build.

A file the Drive connection couldn't download (too big for its temporary
storage) was copied inside Google into the connected account, shared with
the link, and imported from the copy. For big files that import failed:
Drive answers a header check on a fresh copy with an empty HTML page (seen
for 8 minutes and more, on every copy tried) while the file itself
downloads, and the video host, which checks first, refused the download as
an invalid or inconsistent response. 11 of the 15 clips that took that
route failed this way, most of them interviews.

Such a file now comes by the original's shared link, which answers the same
check with the video and its size, with the existing waits when Drive
limits it. No copy is made any more; copies an earlier version made are
still deleted once their import is over.
@pallaoro
pallaoro merged commit 408aa60 into main Oct 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant