Issue with downloading large gzip files from S3

Nextcloud Hub 8 , 29.0.5
Ubuntu 22.04 Server
LiteSpeed enterprise 6.22
PHP Version: 8.2.22 FastCGI
mem. limit 1024mb

I’m copying files from S3 to a folder on a server disk, large files ranging from 4GB to 8GB.
When I download multiple files at once, they all have errors. When I download them individually, sometimes it works fine, but more often than not. Opening them in Midnight commander throws an error, like an unexpected end of archive or other issues.

The problem is that Nextcloud doesn’t show any error messages, and the download ends as if everything is fine.
So each file needs to be downloaded multiple times, and the size checked manually.
Is there an app that compares the file sizes between S3 and the downloaded one, or any app that can help in this situation?

What could be the issue?
How should Nextcloud be configured to handle files of this size?

Additional Info:
S3 is hosted on Cloudflare.
The access granted to Nextcloud is read-only.

I’ve updated Nextcloud to the latest version and tweaked PHP settings, but I’m still facing the problem.

When downloading files, the archive sizes are inconsistent and sometimes there’s no error message when opening gzip, even though the downloaded file is clearly smaller than expected.

I’m not fully following. Is the below accurate?

You have an S3 bucket mounted via Nextcloud’s External Storage feature.

You’re downloading via… What? The Nextcloud Web UI? Some WebDAV client?