-
Notifications
You must be signed in to change notification settings - Fork 1
UploadedFile: getStream Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\UploadedFile
Retrieve a stream representing the uploaded file.
-
return
StreamInterface
Example:
$stream = new Stream(fopen(BOOTSTRAP_DIR . '/sample/shieldon_logo.png', 'r+'));
$uploadedFile = new UploadedFile($stream);
$stream2 = $uploadedFile->getStream();
echo $stream2->getMetadata('mode');
// Outputs: r+
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.