Skip to content

Commit 60f536f

Browse files
Merge pull request #26 from DerkNh1816/fix-mime-type-detection-for-non-buffer-content
change detectMimeTypeFromBuffer to detectMimeType
2 parents 667d77c + a088154 commit 60f536f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AzureBlobStorageAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ private function upload(string $path, $contents, ?Config $config = null): void
104104
try {
105105
$options = $this->buildUploadOptionsFromConfig($config);
106106

107-
if ($options->httpHeaders->contentType === "" && is_string($contents)) {
108-
$options->httpHeaders->contentType = $this->mimeTypeDetector->detectMimeTypeFromBuffer($contents) ?? "";
107+
if ($options->httpHeaders->contentType === "") {
108+
$options->httpHeaders->contentType = $this->mimeTypeDetector->detectMimeType($path, $contents) ?? "";
109109
}
110110

111111
$this->containerClient

0 commit comments

Comments
 (0)