連接在使用下面的代碼文章How to use the Windows Azure Blob Storage Service in .NET證明如果你有這樣的在BLOB接受文件和它們儲存在長時間運行的服務的一個將如何上傳文件緩存到Azure的Blob存儲
// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container.
CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
// Retrieve reference to a blob named "myblob".
CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob");
// Create or overwrite the "myblob" blob with contents from a local file.
using (var fileStream = System.IO.File.OpenRead(@"path\myfile"))
{
blockBlob.UploadFromStream(fileStream);
}
存儲你會每次執行所有這些步驟嗎?或者,您是否可能有一個課程參考了多個請求所使用的blockBlob
?多少(如果有)這是可以緩存和使用多個請求? (我猜的意思是線程)
爲什麼我不同意? https://www.youtube.com/watch?v=i5j1wWY-qus –