Skip to content

Commit 04353b5

Browse files
authored
[SimpleS3] Added has(), download() and upload() (#653)
* [SimpleS3] Added has(), download() and upload() * Added Symfony integration * Updated partSize * Doc updates
1 parent fde90f9 commit 04353b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Stream/StreamFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
*/
1212
class StreamFactory
1313
{
14-
public static function create($content): RequestStream
14+
public static function create($content, int $preferredChunkSize = 64 * 1024): RequestStream
1515
{
1616
if (null === $content || \is_string($content)) {
1717
return StringStream::create($content ?? '');
1818
}
1919
if (\is_callable($content)) {
20-
return CallableStream::create($content);
20+
return CallableStream::create($content, $preferredChunkSize);
2121
}
2222
if (\is_iterable($content)) {
2323
return IterableStream::create($content);
2424
}
2525
if (\is_resource($content)) {
26-
return ResourceStream::create($content);
26+
return ResourceStream::create($content, $preferredChunkSize);
2727
}
2828

2929
throw new InvalidArgument(sprintf('Unexpected content type "%s".', \is_object($content) ? \get_class($content) : \gettype($content)));

0 commit comments

Comments
 (0)