Repository navigation
Photos refuses a file Apple won't take before sending any of it - #269
Merged
Merged
Conversation
Apple only says no to a file once all of it is up, so an AVI, a panorama past Photos' size or a video in an old camera codec went up whole (up to 500 MB) to be refused. Now a few header reads decide first: - a photo past 20,480 px a side or 419,430,400 px in all (JPEG, PNG, GIF, WebP, TIFF, HEIC through its primary item's ispe), as icloud.com checks; - AVI, MKV/WebM, MPEG-PS/TS, ASF/WMV, FLV and WeChat WXGF content, whatever the file is named; .avi dropped from the types; - MP4/MOV tracks in MPEG-4 Part 2, Motion JPEG, or camera PCM sound (twos/sowt/raw), read from the sample descriptions with a bounded box walker. An .m4v goes to putAsset named .mp4: Apple refuses .m4v by name alone. The queue and Send to iPhone run the same check, so a refused file fails at once with why, or goes to iCloud Drive instead.
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.
Apple only says no to a file once all of it is up, so an AVI, a panorama
past Photos' size or a video in an old camera codec went up whole (up to
500 MB) to be refused. Now a few header reads decide first:
WebP, TIFF, HEIC through its primary item's ispe), as icloud.com checks;
whatever the file is named; .avi dropped from the types;
(twos/sowt/raw), read from the sample descriptions with a bounded box
walker.
An .m4v goes to putAsset named .mp4: Apple refuses .m4v by name alone.
The queue and Send to iPhone run the same check, so a refused file fails
at once with why, or goes to iCloud Drive instead.
Containers refused are those outside icloud.com's own upload list (JPEG, PNG, HEIF, HEIC, MOV, MP4, TIFF, GIF, M4V, WebP; docs/icloud-web/photos.md), so
avileaves TYPES. Codec refusals are the ones isynca saw refused live on the same photosupload service (PRs #3, #8, #9). 9 new tests on generated files, including truncated and corrupted input; the wiremock test proves no createUploadUrl for a refused file. Fail-before: 5 of them fail with the checks removed.