连接在使用下面的代码文章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 –