Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

#295 Add missing x-ms-blob-type header to createFile and createFileFromContents requests #296

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions azure-storage-common/src/Common/Internal/Resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class Resources
const X_MS_CLIENT_REQUEST_ID = 'x-ms-client-request-id';
const X_MS_CONTINUATION_LOCATION_MODE = 'x-ms-continuation-location-mode';
const X_MS_TYPE = 'x-ms-type';
const X_MS_BLOB_TYPE = 'x-ms-blob-type';
const X_MS_CONTENT_LENGTH = 'x-ms-content-length';
const X_MS_CACHE_CONTROL = 'x-ms-cache-control';
const X_MS_CONTENT_TYPE = 'x-ms-content-type';
Expand Down
29 changes: 12 additions & 17 deletions azure-storage-file/src/File/FileRestProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ private function multiplePutRangeConcurrentAsync(
$options = new PutFileRangeOptions();
}

$this->addOptionalQueryParam(
$queryParams,
Resources::QP_COMP,
'range'
$this->addOptionalHeader(
$headers,
Resources::X_MS_BLOB_TYPE,
'BlockBlob'
);

$this->addOptionalQueryParam(
Expand Down Expand Up @@ -398,11 +398,6 @@ private function multiplePutRangeConcurrentAsync(
$chunkRange = new Range($start);
$chunkRange->setLength($size);

$selfInstance->addOptionalHeader(
$headers,
Resources::X_MS_RANGE,
$chunkRange->getRangeString()
);

$this->addOptionalHeader(
$headers,
Expand Down Expand Up @@ -1603,6 +1598,12 @@ public function createFileAsync(
'file'
);

$this->addOptionalHeader(
$headers,
Resources::X_MS_BLOB_TYPE,
'BlockBlob'
);

$this->addOptionalQueryParam(
$queryParams,
Resources::QP_TIMEOUT,
Expand Down Expand Up @@ -2246,8 +2247,8 @@ public function putFileRangeAsync(

$this->addOptionalHeader(
$headers,
Resources::X_MS_RANGE,
$range->getRangeString()
Resources::X_MS_BLOB_TYPE,
'BlockBlob'
);

$this->addOptionalHeader(
Expand All @@ -2268,12 +2269,6 @@ public function putFileRangeAsync(
$options->getContentMD5()
);

$this->addOptionalQueryParam(
$queryParams,
Resources::QP_COMP,
'range'
);

return $this->sendAsync(
$method,
$headers,
Expand Down