Skip to content
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
5 changes: 3 additions & 2 deletions lib/Beberlei/AzureBlobStorage/BlobClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public function putBlob($containerName = '', $blobName = '', $localFileName = ''
throw new BlobException('Local file name is not specified.');
}
if (!file_exists($localFileName)) {
throw new BlobException('Local file not found.');
throw new BlobException('Local file '.$localFileName.' not found.');
}
if ($containerName === '$root' && strpos($blobName, '/') !== false) {
throw new BlobException('Blobs stored in the root container can not have a name containing a forward slash (/).');
Expand Down Expand Up @@ -1431,7 +1431,8 @@ public function getBlobInstance($containerName = '', $blobName = '', $snapshotId
$response->getHeader('x-ms-blob-type'),
$response->getHeader('x-ms-lease-status'),
false,
$metadata
$metadata,
$response->getHeader('content-md5')
);
} else {
throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
Expand Down
7 changes: 5 additions & 2 deletions lib/Beberlei/AzureBlobStorage/BlobInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* @property string $LeaseStatus The blob lease status.
* @property boolean $IsPrefix Is it a blob or a directory prefix?
* @property array $Metadata Key/value pairs of meta data
* @property string $content_md5 base64 encoded 128 bits of MD5 hash of the contnet
*/
class BlobInstance
{
Expand All @@ -58,8 +59,9 @@ class BlobInstance
* @param string $leaseStatus Lease status
* @param boolean $isPrefix Is Prefix?
* @param array $metadata Key/value pairs of meta data
* @param strring $content_md5 base64 encoded 128 bits of MD5 hash of the contnet
*/
public function __construct($containerName, $name, $snapshotId, $etag, $lastModified, $url = '', $size = 0, $contentType = '', $contentEncoding = '', $contentLanguage = '', $cacheControl = '', $blobType = '', $leaseStatus = '', $isPrefix = false, $metadata = array())
public function __construct($containerName, $name, $snapshotId, $etag, $lastModified, $url = '', $size = 0, $contentType = '', $contentEncoding = '', $contentLanguage = '', $cacheControl = '', $blobType = '', $leaseStatus = '', $isPrefix = false, $metadata = array(), $content_md5 = null)
{
$this->data = array(
'container' => $containerName,
Expand All @@ -76,7 +78,8 @@ public function __construct($containerName, $name, $snapshotId, $etag, $lastModi
'blobtype' => $blobType,
'leasestatus' => $leaseStatus,
'isprefix' => $isPrefix,
'metadata' => $metadata
'metadata' => $metadata,
'content_md5' => $content_md5,
);
}

Expand Down