Repository navigation
iOS: send and download files too large for one message - #120
Merged
Merged
Conversation
The main node gets a large-file store before it listens: sealed copies in the media folder, read a range at a time, a reserved file for each download, and the free space. A file picked in a chat with one contact over the message limit is copied and sealed a chunk at a time into the media folder (a picked file may not stay readable for the 30 days it is served) and offered from there, with a thumbnail made from the picked file: ImageIO for photos, AVAssetImageGenerator for videos. A large photo from the library is kept from the picker's bytes. Offered files show their thumbnail and how the download stands; a tap starts, cancels or retries it, progress updates the bubble in place, and the chat reloads once the file is here. Offers notify like files.
larrydewey
force-pushed
the
feat/large-files-ios
branch
from
November 29, 2026 15:23
ac1cd29 to
7c2d789
Compare
larrydewey
marked this pull request as ready for review
November 29, 2026 15:23
Merged
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.
iOS's part of Appendix U phase 1 (replaces #119, which closed when its base branch went with #118).
Store (
IosLargeFiles, set on the main node before it listens):sizeviamediaSize,readAtviareadMediaRangefor sealed files (plain ones by seek and read),reservemakes an empty 0600 file in the media folder,freeSpacefromvolumeAvailableCapacityForImportantUsage.Sending. In a chat with one contact, from the main identity, a picked file over the message limit is copied into the media folder, sealed a chunk at a time (
sealMediaFile). Unlike Android's persisted SAF permission, a picked iOS URL can't be counted on to stay readable for the 30 days a file is served. It is then offered withsendFileAt. Its thumbnail comes from the picked file: ImageIO for photos,AVAssetImageGeneratorfor videos. A photo-library pick that size is kept from the picker's bytes. Groups, notes and anonymous identities still refuse files over the limit.Receiving.
Offers(an@Observable, in the environment) holds each offer'sTransferStateand thumbnail;FileContentshows the thumbnail and Tap to download (size) / progress / retry.TransferChangedupdates the bubble in place,Donereloads the chat.FileOfferednotifies like a file.Not run yet. This Linux machine can't build iOS. CI's iOS job compiles it; it needs a run on the Mac: a large file each way with a phone or the desktop, including a video's thumbnail, cancel, and a download after the app restarts.