getBytesRemaining.ts 259 B

123456
  1. import type { FileProgress } from './FileProgress.js'
  2. export default function getBytesRemaining(fileProgress: FileProgress): number {
  3. if (fileProgress.bytesTotal == null) return 0
  4. return fileProgress.bytesTotal - (fileProgress.bytesUploaded as number)
  5. }