Commit d82b7d5
committed
fix: re-enable streaming zip on Safari to prevent iOS OOM crash
The buffered zip path (createZipFromUploadFiles) loads all file data into
memory simultaneously: chunks array + Uint8Array copy + JSZip buffer +
output blob = ~3-4x the input size in peak memory. For a 430MB upload,
this reaches ~1.3-1.7GB and triggers iOS Safari's jetsam OOM killer,
causing a silent page refresh with no error.
Re-enable streaming zip for large multi-file uploads on all browsers.
The streaming zip uses constant memory (processes chunks incrementally).
Its size estimates may differ from actual bytes on Safari, but the upload
pipeline handles this gracefully via empty-chunk filtering, the
pre-completion consistency check, and R2 accepting fewer parts than
originally allocated.1 parent 599b66b commit d82b7d5
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
682 | 684 | | |
683 | 685 | | |
684 | 686 | | |
| |||
698 | 700 | | |
699 | 701 | | |
700 | 702 | | |
701 | | - | |
| 703 | + | |
702 | 704 | | |
703 | 705 | | |
704 | 706 | | |
| |||
0 commit comments