fix: S3Uploader multipart uploadPart() loads 10MB chunks into memory #183
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
S3Uploader.php:245-280—uploadPart()reads entire 10 MB chunks into a$datastring and passes toCURLOPT_POSTFIELDS. For a 1 GB file that's 100 iterations holding 10 MB strings. The single-upload path correctly usesCURLOPT_PUT+CURLOPT_INFILEstreaming, but multipart does not.Location
src/Engine/S3Uploader.php:245-280Fix
Use
CURLOPT_PUT+CURLOPT_INFILEwithfseek()to the chunk offset andCURLOPT_INFILESIZEfor each part, matching the streaming pattern insingleUpload().Branch created:
feature/183-fix-s3uploader-multipart-uploadpart-load