Skip to content

Commit

Permalink
put conditional in fn
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Dec 20, 2023
1 parent 5ff1901 commit f59746b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/web/ResponseBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ public function afterPrepare(Event $event): void
{
$this->joinMultiValueHeaders();
$this->gzip();

if ($this->owner->stream) {
$this->serveBinaryFromS3();
}
$this->serveBinaryFromS3();
}

/**
* @throws ServerErrorHttpException
*/
protected function serveBinaryFromS3(): void
{
if (!$this->owner->stream) {
return;
}

/** @var TmpFs $fs */
$fs = Craft::createObject([
'class' => TmpFs::class,
Expand Down

0 comments on commit f59746b

Please sign in to comment.