Permalink
Browse files

刪除 Blob

  • Loading branch information...
1 parent 90c6bdd commit 1ca521fece2d59b672f2edfd536a48954d02befc Sam.IO.Hsiao committed Aug 14, 2016
Showing with 18 additions and 0 deletions.
  1. +18 −0 app/Services/AzureBlobService.php
@@ -105,4 +105,22 @@ public function downloadBlob(string $containerName, string $blobName) : bool
return true;
}
+ /**
+ * 刪除 Blob
+ * @param string $containerName
+ * @param string $blobName
+ * @return bool
+ */
+ public function deleteBlob(string $containerName, string $blobName) : bool
+ {
+ try {
+ $this->blobProxy->deleteBlob($containerName, $blobName);
+ } catch (ServiceException $exception) {
+ echo $exception->getCode() . ':' . $exception->getMessage();
+ return false;
+ }
+
+ return true;
+ }
+
}

0 comments on commit 1ca521f

Please sign in to comment.