Repository navigation
Footage: when Drive refuses even a byte of a shared link, ask the connection - #66
Merged
Merged
Conversation
…nection Drive can refuse a file's shared link entirely, its first byte included, so the relay had no size: the clip waited on Drive, and a file over the video host's limit was never told apart. The size now comes from the org's Drive connection when the shared link won't give it; the pieces come through the connection too, as they already did for refused ranges. A file over the limit fails at once with the reason.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drive can refuse a file's shared link entirely, its first byte included. Live: a 32.6 GB file got the quota page for
Range: bytes=0-0, while the Drive API through the connection answered its size. The relay reads the size from that one-byte range, so it had none: the clip waited on Drive, and a file over the video host's limit was never told apart.The size now comes from the org's Drive connection when the shared link won't give it (
driveFileSize,DriveSource.size). From there, everything works as before:Up to 30 GB: the clip comes in by pieces, each read through the connection where the shared link refuses it (Drive: Google's own Drive API through the connection, not its broker's actions #64).
Over 30 GB: it fails at once with the reason (Footage: a file over the video host's 30 GB limit fails at once, saying so #65).
Unit:
driveFileSizereturns Drive's own number, or null when the connection won't say.End to end:
Typecheck clean, 200 unit tests, end to end ALL OK.