mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: use php://temp instead of php://memory for multi-part upload buffer
this should reduce potential memory issues if the limit is set very high Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
7bc21d8a34
commit
7da8951c57
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ trait S3ObjectTrait {
|
|||
|
||||
// ($psrStream->isSeekable() && $psrStream->getSize() !== null) evaluates to true for a On-Seekable stream
|
||||
// so the optimisation does not apply
|
||||
$buffer = new Psr7\Stream(fopen('php://memory', 'rwb+'));
|
||||
$buffer = new Psr7\Stream(fopen('php://temp', 'rwb+'));
|
||||
Utils::copyToStream($psrStream, $buffer, $this->putSizeLimit);
|
||||
$buffer->seek(0);
|
||||
if ($buffer->getSize() < $this->putSizeLimit) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue