1. 程式人生 > >如何把檔案上傳的Microsoft Azure的Blob儲存 ?

如何把檔案上傳的Microsoft Azure的Blob儲存 ?

       Microsoft Azure Portal沒有提供可以直接把檔案上傳到Azure Blob的介面,你可以使用Azure API編寫程式完成檔案上載。更簡單的方法,則是下載使用Azure Powershell SDK 提供的命令工具Set-AzureStorageBlogContent。可惜地市MSDN上並未給出詳細的使用介紹,下面是一個我用過的例子 :

        New-AzureStorageContext -StorageAccountName <mystorageaccount> -StorageAccountKey <mystoragekey>  `

                 | Set-AzureStorageBlobContent -Container <mycontainer> -File d:\myfile.zip -Force