Skip to content

Commit

Permalink
Fixed azure blob write method (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbochenski authored Nov 3, 2022
1 parent d193cb7 commit 9bc0118
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Gaufrette/Adapter/AzureBlobStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ public function write($key, $content)
$options->setContentType($contentType);
}

$size = is_resource($content)
? Util\Size::fromResource($content)
: Util\Size::fromContent($content)
;

try {
if ($this->multiContainerMode) {
$this->createContainer($containerName);
Expand All @@ -209,11 +214,8 @@ public function write($key, $content)

return false;
}
if (is_resource($content)) {
return Util\Size::fromResource($content);
}

return Util\Size::fromContent($content);
return $size;
}

/**
Expand Down

0 comments on commit 9bc0118

Please sign in to comment.