mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -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
bb720fc6fa
commit
b1ad63666f
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