HttpDriver.php: fix download max size logic

This commit is contained in:
fowr 2025-04-02 09:07:56 -03:00
parent a5770a2de5
commit 9f9fba63d9

View file

@ -115,7 +115,7 @@ class HttpDriver {
$opt = (\PHP_MAJOR_VERSION >= 8 && \PHP_MINOR_VERSION >= 2) ? \CURLOPT_XFERINFOFUNCTION : \CURLOPT_PROGRESSFUNCTION;
\curl_setopt_array($this->inner, [
\CURLOPT_NOPROGRESS => false,
$opt => fn($res, $next_dl, $dl, $next_up, $up) => (int)($dl <= $this->max_file_size),
$opt => fn($res, $next_dl, $dl, $next_up, $up) => (int)($dl > $this->max_file_size),
\CURLOPT_FAILONERROR => true,
\CURLOPT_FOLLOWLOCATION => false,
\CURLOPT_FILE => $fd,