Using the Guzzle stream directly here will only return 1739 characters for `fread` instead of all data. This leads to the problem that the stream is read incorrectly and thus the data cannot be properly decrypted => 💣
This approach copies the data into a local temporary file, as done before in all stable releases as well as other storage connectors.
While this approach will load the whole file into memory, this is already was has happened before in any stable release as well. See d608c37c90 for the breaking change.
To test this enable Google Drive as external storage and upload some files with encryption enabled. Reading the file should fail now.
Fixes https://github.com/owncloud/core/issues/22590