mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Fix error handling for large files (and endpoints called as non-json)
This commit is contained in:
@@ -49,9 +49,7 @@ class DaemonFileRepository extends DaemonRepository
|
||||
$length = (int) $response->getHeader('Content-Length')[0] ?? 0;
|
||||
|
||||
if ($notLargerThan && $length > $notLargerThan) {
|
||||
throw new FileSizeTooLargeException(
|
||||
trans('server.files.exceptions.max_size')
|
||||
);
|
||||
throw new FileSizeTooLargeException;
|
||||
}
|
||||
|
||||
return $response->getBody()->__toString();
|
||||
|
||||
Reference in New Issue
Block a user