快速入門:使用 Azure 入口網站上傳、下載及列出 BlobQuickstart: Upload, download, and list blobs with the Azure portal

在本快速入門中,您會了解如何使用 Azure 入口網站在 Azure 儲存體中建立容器,並且在該容器中上傳和下載區塊 blob。In this quickstart, you learn how to use the Azure portal to create a container in Azure Storage, and to upload and download block blobs in that container.

PrerequisitesPrerequisites

若要存取 Azure 儲存體,您需要有 Azure 訂用帳戶。To access Azure Storage, you'll need an Azure subscription. 如果您還沒有訂用帳戶,請先建立免費帳戶,再開始操作。If you don't already have a subscription, create a free account before you begin.

對 Azure 儲存體的所有存取都是透過儲存體帳戶進行。All access to Azure Storage takes place through a storage account. 在本快速入門中,使用 Azure 入口網站、Azure PowerShell 或 Azure CLI 建立儲存體帳戶。For this quickstart, create a storage account using the Azure portal, Azure PowerShell, or Azure CLI. 如需建立儲存體帳戶的協助,請參閱建立儲存體帳戶For help creating a storage account, see Create a storage account.

建立容器Create a container

若要在 Azure 入口網站中建立容器,請遵循下列步驟:To create a container in the Azure portal, follow these steps:

  1. 在 Azure 入口網站中瀏覽至新的儲存體帳戶。Navigate to your new storage account in the Azure portal.

  2. 在儲存體帳戶的左窗格中,捲動到 [Blob 服務] 區段,然後選取 [容器] 。In the left menu for the storage account, scroll to the Blob service section, then select Containers.

  3. 選取 [+ 容器] 按鈕。Select the + Container button.

  4. 輸入新容器的名稱。Type a name for your new container. 容器名稱必須是小寫,以字母或數字開頭,並且只能包含字母、數字和虛線 (-) 字元。The container name must be lowercase, must start with a letter or number, and can include only letters, numbers, and the dash (-) character. 如需關於容器和 Blob 名稱的詳細資訊,請參閱命名和參考容器、Blob 及中繼資料For more information about container and blob names, see Naming and referencing containers, blobs, and metadata.

  5. 設定容器的公用存取層級。Set the level of public access to the container. 預設層級是 [私用 (沒有匿名存取權)] 。The default level is Private (no anonymous access).

  6. 選取 [確定] 以建立容器。Select OK to create the container.

    顯示如何在 Azure 入口網站中建立容器的螢幕擷取畫面

上傳區塊 BlobUpload a block blob

區塊 Blob 是由組合以成為 Blob 的資料區塊所組成。Block blobs consist of blocks of data assembled to make a blob. 使用 Blob 儲存體的大部分案例會採用區塊 Blob。Most scenarios using Blob storage employ block blobs. 區塊 Blob 十分適用於在雲端中儲存文字和二進位資料,例如檔案、映像和影片。Block blobs are ideal for storing text and binary data in the cloud, like files, images, and videos. 本快速入門示範如何使用區塊 Blob。This quickstart shows how to work with block blobs.

若要將區塊 Blob 上傳到 Azure 入口網站中的新容器,請遵循下列步驟:To upload a block blob to your new container in the Azure portal, follow these steps:

  1. 在 Azure 入口網站中,瀏覽至您在上一節中建立的容器。In the Azure portal, navigate to the container you created in the previous section.

  2. 選取容器以顯示它所包含的 Blob 清單。Select the container to show a list of blobs it contains. 此容器是新的,因此尚未包含任何 Blob。This container is new, so it won't yet contain any blobs.

  3. 選取 [上傳] 按鈕以開啟 [上傳] 刀鋒視窗,然後瀏覽您的本機檔案系統,尋找要上傳做為區塊 blob 的檔案。Select the Upload button to open the upload blade and browse your local file system to find a file to upload as a block blob. 您可以選擇性地展開 [進階] 區段,進行上傳作業的其他設定。You can optionally expand the Advanced section to configure other settings for the upload operation.

    顯示如何從本機磁碟機上傳 Blob 的螢幕擷取畫面

  4. 選取 [上傳] 按鈕上傳 Blob。Select the Upload button to upload the blob.

  5. 用這種方式上傳任意數量的 Blob。Upload as many blobs as you like in this way. 您會看到新的 Blob 現在列在容器內。You'll see that the new blobs are now listed within the container.

下載區塊 BlobDownload a block blob

您可以下載區塊 Blob,以在瀏覽器中顯示或儲存到本機檔案系統。You can download a block blob to display in the browser or save to your local file system. 若要下載區塊 Blob,請遵循下列步驟:To download a block blob, follow these steps:

  1. 瀏覽至您在上一節中上傳的 Blob 清單。Navigate to the list of blobs that you uploaded in the previous section.

  2. 以滑鼠右鍵按一下您要下載的 Blob,然後選取 [下載] 。Right-click the blob you want to download, and select Download.

    顯示如何下載 Blob 的螢幕擷取畫面

刪除區塊 BlobDelete a block blob

您可以下載區塊 Blob,以在瀏覽器中顯示或儲存到本機檔案系統。You can download a block blob to display in the browser or save to your local file system. 若要下載區塊 Blob,請遵循下列步驟:To download a block blob, follow these steps:

  1. 瀏覽至您在上一節中上傳的 Blob 清單。Navigate to the list of blobs that you uploaded in the previous section.
  2. 選取您想要刪除的 Blob,然後選取頂端動作列中的 [刪除]。Select the blobs you want to delete, and select Delete in the top action bar.

清除資源Clean up resources

若要移除您在本快速入門中建立的所有資源,只要刪除容器即可。To remove all the resources you created in this quickstart, you can simply delete the container. 容器中的所有 Blob 也會遭到刪除。All blobs in the container will also be deleted.

若要刪除容器:To delete the container:

  1. 在 Azure 入口網站中,瀏覽至儲存體帳戶中的容器清單。In the Azure portal, navigate to the list of containers in your storage account.
  2. 選取要刪除的容器。Select the container to delete.
  3. 選取 [更多] 按鈕 ( ... ),然後選取 [刪除] 。Select the More button (...), and select Delete.
  4. 確認您要刪除容器。Confirm that you want to delete the container.

後續步驟Next steps

在此快速入門中,您已了解如何使用 Azure 入口網站在本機磁碟和 Azure Blob 儲存體之間傳輸檔案。In this quickstart, you learned how to transfer files between a local disk and Azure Blob storage with Azure portal. 若要深入了解 Blob 儲存體的用法,請繼續閱讀 Blob 儲存體操作說明。To learn more about working with Blob storage, continue to the Blob storage How-to.