Skip to content

Commit 9bc0118

Browse files
authored
Fixed azure blob write method (#683)
1 parent d193cb7 commit 9bc0118

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Gaufrette/Adapter/AzureBlobStorage.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ public function write($key, $content)
198198
$options->setContentType($contentType);
199199
}
200200

201+
$size = is_resource($content)
202+
? Util\Size::fromResource($content)
203+
: Util\Size::fromContent($content)
204+
;
205+
201206
try {
202207
if ($this->multiContainerMode) {
203208
$this->createContainer($containerName);
@@ -209,11 +214,8 @@ public function write($key, $content)
209214

210215
return false;
211216
}
212-
if (is_resource($content)) {
213-
return Util\Size::fromResource($content);
214-
}
215217

216-
return Util\Size::fromContent($content);
218+
return $size;
217219
}
218220

219221
/**

0 commit comments

Comments
 (0)