azure-storage-blobs

Copy blob between storage accounts

混江龙づ霸主 提交于 2019-12-21 05:07:32
问题 I'm trying to copy a blob from one storage account to another (In a different location). I'm using the following code: var sourceContainer = sourceClient.GetContainerReference(containerId); var sourceBlob = sourceContainer.GetBlockBlobReference(blobId); if (await sourceBlob.ExistsAsync().ConfigureAwait(false)) { var targetContainer = targetClient.GetContainerReference(containerId); await targetContainer.CreateIfNotExistsAsync().ConfigureAwait(false); var targetBlob = targetContainer

Why upload to Azure blob so slow?

对着背影说爱祢 提交于 2019-12-21 03:51:33
问题 I have a custom stream that is used to perform write operations directly into the page cloud blob. public sealed class WindowsAzureCloudPageBlobStream : Stream { // 4 MB is the top most limit for page blob write operations public const int MaxPageWriteCapacity = 4 * 1024 * 1024; // Every operation on a page blob has to manipulate a value which is rounded up to 512 bytes private const int PageBlobPageAdjustmentSize = 512; private CloudPageBlob _pageBlob; public override void Write(byte[]

Batch Uploading Huge Sets of Images to Azure Blob Storage

僤鯓⒐⒋嵵緔 提交于 2019-12-20 12:38:31
问题 I have about 110,000 images of various formats (jpg, png and gif) and sizes (2-40KB) stored locally on my hard drive. I need to upload them to Azure Blob Storage. While doing this, I need to set some metadata and the blob's ContentType, but otherwise it's a straight up bulk upload. I'm currently using the following to handle uploading one image at a time (paralleled over 5-10 concurrent Tasks). static void UploadPhoto(Image pic, string filename, ImageFormat format) { //convert image to bytes

How do I upload some file into Azure blob storage without writing my own program?

一个人想着一个人 提交于 2019-12-20 09:26:25
问题 I created an Azure Storage account. I have a 400 megabytes .zip file that I want to put into blob storage for later use. How can I do that without writing code? Is there some interface for that? 回答1: Free tools: Visual Studio 2010 -- install Azure tools and you can find the blobs in the Server Explorer Cloud Berry Lab's CloudBerry Explorer for Azure Blob Storage ClumpsyLeaf CloudXplorer Azure Storage Explorer from CodePlex (try version 4 beta) There was an old program called Azure Blob

Azure diagnostics and WadLogsTable

拥有回忆 提交于 2019-12-20 05:59:31
问题 I deployed an application on Windows Azure, i activated the diagnostic monitor like follows : public override bool OnStart() { CloudStorageAccount account = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=[xxxxxx];AccountKey=[xxxxxxx]"); var config = DiagnosticMonitor.GetDefaultInitialConfiguration(); config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information; config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1D); DiagnosticMonitor.Start(account, config)

Azure Blob Storage | AcquireLeaseAsync, synchronously wait until lock is released

不羁的心 提交于 2019-12-20 04:52:53
问题 Right now I'm making a HTTP serverless function with Azure Functions and with that I need to make my incoming requests synchronous when accessing a single Blob Storage Item on my Storage Account. What I want to happen is the following: // Incoming Request 1 // .. Get blob await myBlob.AcquireLeaseAsync(TimeSpan.FromMinutes(1), leaseId); // .. 10 seconds later await myblob.ReleaseLeaseAsync(AccessCondition.GenerateEmptyCondition()); // // MEANWHILE // // Incoming Request 2 (Happens 1-2 seconds

Getting Storage Account Properties using Storage Services REST API

為{幸葍}努か 提交于 2019-12-20 04:38:11
问题 Is there a way to get properties of a storage account, specifically the kind of account - GPv1, GPv2 or blob storage, through an API in Storage Services? I came across https://msdn.microsoft.com/en-us/library/azure/ee460802.aspx but if possible, I would like to re-use the SharedKey authentication I use for the Blob Service APIs. In this page, https://docs.microsoft.com/en-us/rest/api/storageservices/ I found this: "All access to storage services takes place through the storage account. The

Use wildcards in WASB ListBlobs

孤人 提交于 2019-12-19 11:37:30
问题 I'm using Azure .Net SDK to list all blobs from Windows Azure Storage Blob container. let client = account.CreateCloudBlobClient() let container = client.GetContainerReference("my-container") let list = container.ListBlobs("data/2014-*-17/", false) // ! here as you can see i'm trying to filter blobs by wildcarded prefix. UPD Not supported as 07/2019 回答1: Unfortunately this won't work as Azure Storage does not allow you to do server-side wild card filtering. Only filtering option available to

Azure downloadtostreamasync method hangs

笑着哭i 提交于 2019-12-19 05:21:24
问题 here is the offending code public async static Task<MemoryStream> AsyncReadBlob(string identifier) { CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageString); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference(containerName); MemoryStream memstream = new MemoryStream(); CloudBlockBlob blockBlob = container.GetBlockBlobReference(identifier); await blockBlob.DownloadToStreamAsync(memstream);

How do I force Azure CDN content to be purged or invalidated?

天大地大妈咪最大 提交于 2019-12-18 21:54:25
问题 I have content that rarely changes that I want to serve over the Azure CDN for performance reasons. When the content does change, though, it's important that the updated data is immediately available. Ideally, I'd be able to set a long TTL but then proactively tell the CDN to expire content when I update it. How can I accomplish this? There is no cache invalidation or purge API right now, and I would rather not set a short TTL. 回答1: In 2015 December the Azure team added the ability to refresh