FilenUpload constructor

FilenUpload({
  1. required FilenApi api,
  2. required FilenCrypto crypto,
  3. required FilenCache cache,
  4. required FilenDrive drive,
  5. MemoryGate? memoryGate,
})

Implementation

FilenUpload({
  required this.api,
  required this.crypto,
  required this.cache,
  required this.drive,
  MemoryGate? memoryGate,
}) : memoryGate = memoryGate ??
          // Per-chunk byte budget (Step 1): a fixed ceiling on bytes in
          // flight, no per-chunk system-memory polling. 64 MB comfortably
          // holds the default 4–8 chunks (~2 MB each) without constraining
          // the degree, and is modest enough for mobile.
          MemoryGate(maxBytes: 64 * 1024 * 1024, safetyMarginBytes: 0);