Skip to content

Commit

Permalink
Slightly increase chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed May 1, 2024
1 parent a216174 commit f3e3800
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Api/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ public static function chunkSize(): int
Str::toBytes(ini_get('post_max_size'))
];

//if server is behind a cloudflare proxy
// if server is behind a cloudflare proxy
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) === true) {
$max[] = Str::toBytes('100M');
}

// to be sure, only use 90% of the max possible upload size
return (int)floor(min($max) * 0.9);
// to be sure, only use 95% of the max possible upload size
return (int)floor(min($max) * 0.95);
}

/**
Expand Down

0 comments on commit f3e3800

Please sign in to comment.