-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use temp stream instead of string to buffer content (#52)
* Use temp stream instead of string to buffer content * Update MultipartStreamBuilder::build to buffer built content in a php://temp stream resource instead of (string) $contents. This way, the size of the stream built won't be limited by PHP runtime limit. * Detect available memory for maxmemory in buffer * Detect available memory (in bytes). Then config the buffer stream to stay in memory until reaching 1/4 of that. * Added setBufferMaxMemory to manually override that limit. * Fix code style * Improve documentation to getAvailableMemory * Improve documentation to MultipartStreamBuilder::getAvailableMemory * Update CHANGELOG.md * Remove the memory detection logic from build * Remove the memory detection logic from MultipartStreamBuilder::build. * Code style update * Minor updates * Improve readability of comment. * Use the old __toString approach if the stream is not isReadable(). * Remove unnecessary comment
- Loading branch information
Showing
2 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters