[FEATURE] Ability to stream to an Amazon S3 bucket (#2326)
Related #2249
This commit is contained in:
parent
86a8bbdd63
commit
1f08f160ad
|
|
@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
|||
- More flexibility in the StringValueBinder to determine what datatypes should be treated as strings [PR #2138](https://github.com/PHPOffice/PhpSpreadsheet/pull/2138)
|
||||
- Helper class for conversion between css size Units of measure (`px`, `pt`, `pc`, `in`, `cm`, `mm`). [PR #2152](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145)
|
||||
- Allow Row height and Column Width to be set using different units of measure (`px`, `pt`, `pc`, `in`, `cm`, `mm`), rather than only in points or MS Excel column width units. [PR #2152](https://github.com/PHPOffice/PhpSpreadsheet/issues/2145)
|
||||
- Ability to stream to an Amazon S3 bucket
|
||||
[Issue #2249](https://github.com/PHPOffice/PhpSpreadsheet/issues/2249)
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,12 @@ abstract class BaseWriter implements IWriter
|
|||
return;
|
||||
}
|
||||
|
||||
$fileHandle = $filename ? fopen($filename, 'wb+') : false;
|
||||
$mode = 'wb+';
|
||||
$scheme = parse_url($filename, PHP_URL_SCHEME);
|
||||
if ($scheme === 's3') {
|
||||
$mode = 'w';
|
||||
}
|
||||
$fileHandle = $filename ? fopen($filename, $mode) : false;
|
||||
if ($fileHandle === false) {
|
||||
throw new Exception('Could not open file "' . $filename . '" for writing.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue