Temporary high consumption of disk space when copying files

Nextcloud version: 23.0.0
Operating system and version: Fedora 35

I’m using Nextcloud Docker image. Nginx reverse proxy is installed on the host system. The data volume is located on a separate HDD, and the app volume itself is in root on the SSD. I noticed this problem back in version 22.x: if I copy large files using WebDAV, the space on the root partition of the SSD runs out very quickly (/tmp of the host system uses tmpfs). At the same time, copying fails and in the log I see the following error, since the root disk space is full:

[PHP] Error: fread(): Write of 8192 bytes failed with errno=28 No space left on device at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55

PUT /cloud/remote.php/webdav/Videos/file.mkv

I tried to look for a similar problem on the forum and found what PHP caused the problem and the solution is to use a different path for sys_temp_dir. I tried to use the following php.ini:

sys_temp_dir = "/var/www/html/data/tmp"

/var/www/html/data is located on another HDD, so this should have solved the problem.
I put this in my docker-compose.yml:

volumes:
  - ./php.ini:/usr/local/etc/php/conf.d/php_custom.ini

but that didn’t solve the problem. I decided that it might be worth moving the entire /tmp directory of the image to tmpfs:

tmpfs:
  - /tmp

but that also gave nothing, as it turned out /tmp of the image is always empty, it looks like Nextcloud Docker doesn’t use it.

So what is the reason for the high consumption of disk space? Where is this directory located in the Nextcloud image that it uses for temporary files when copying?