diff --git a/azure-storage-common/src/Common/Internal/Resources.php b/azure-storage-common/src/Common/Internal/Resources.php index 48128d4f..333d9a5c 100644 --- a/azure-storage-common/src/Common/Internal/Resources.php +++ b/azure-storage-common/src/Common/Internal/Resources.php @@ -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'; diff --git a/azure-storage-file/src/File/FileRestProxy.php b/azure-storage-file/src/File/FileRestProxy.php index c5696522..0174f9be 100644 --- a/azure-storage-file/src/File/FileRestProxy.php +++ b/azure-storage-file/src/File/FileRestProxy.php @@ -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( @@ -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, @@ -1603,6 +1598,12 @@ public function createFileAsync( 'file' ); + $this->addOptionalHeader( + $headers, + Resources::X_MS_BLOB_TYPE, + 'BlockBlob' + ); + $this->addOptionalQueryParam( $queryParams, Resources::QP_TIMEOUT, @@ -2246,8 +2247,8 @@ public function putFileRangeAsync( $this->addOptionalHeader( $headers, - Resources::X_MS_RANGE, - $range->getRangeString() + Resources::X_MS_BLOB_TYPE, + 'BlockBlob' ); $this->addOptionalHeader( @@ -2268,12 +2269,6 @@ public function putFileRangeAsync( $options->getContentMD5() ); - $this->addOptionalQueryParam( - $queryParams, - Resources::QP_COMP, - 'range' - ); - return $this->sendAsync( $method, $headers,