azure-storage

Download all blobs files locally from azure container using python

只愿长相守 提交于 2019-12-22 09:08:09
问题 I'm using python 3.6 in visual studio and I want to download all blobs files from my azure container in single folder. This is my code but the problem is, that it downloads 1 blob file in the folder and then when downloading the second file it overwrite the first file and in the end I only have the last blob in my local folder. How can I download all the blobs files at once in a single folder? from azure.storage.blob import BlockBlobService block_blob_service = BlockBlobService(account_name

Azure table storage - where clause on column that may not exist

风流意气都作罢 提交于 2019-12-22 06:57:51
问题 I am adding a new column to my azure table. For ex., the table is called 'User' and the new column is called 'ComputationDate'. The 'User' table already exists with rows that do not have this new column 'ComputationDate'. I have a query over it as follows, var usersDue = from user in Table.Query where user.ComputationDate != <somedate> select user; I want this query to return all user rows that do not have ComputationDate set to 'somedate' and also user rows that do not have this new

How to set FTP to a Azure Cloud Service or Azure storage?

这一生的挚爱 提交于 2019-12-22 05:53:15
问题 We are new to Windows azure and I would like to know whether we can setup FTP accounts for a azure cloud service so that we can upload files via ftp clients like filezilla? Please let me know how and whether it is recommended or not? Because I have read at some places that files uploaded via ftp are deleted once the azure instance is refreshed which I actually didn’t understand by the word refreshed. Similarly can we create FTP for Windows Azure Storage as well so that we can upload blob

Azure Storage 403 Forbidden exception a 32-bit issue?

不问归期 提交于 2019-12-22 03:50:37
问题 We've spent quite some time to locate the reason for the following exception: The remote server returned an error: (403) Forbidden. Stacktrace: at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Core\\Executor\\Executor.cs:line 604 at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Create

How does one determine if all messages in an Azure Queue have been processed?

浪子不回头ぞ 提交于 2019-12-21 20:47:23
问题 I've just begun tinkering with Windows Azure and would appreciate help with a question. How does one determine if a Windows Azure Queue is empty and that all work-items in it have been processed? If I have multiple worker processes querying a work-item queue, GetMessage(s) returns no messages if the queue is empty. But there is no guarantee that a currently invisible message will not be pushed back into the queue. I need this functionality since follow-up behavior of my workflow depends on

How to start Windows Azure Storage Emulator V3.0 from code

别等时光非礼了梦想. 提交于 2019-12-21 16:52:16
问题 Since I installed the new Windows Azure SDK 2.3 I got a warning from csrun: "DevStore interaction through CSRun has been depricated. Use WAStorageEmulator.exe instead." So there are two questions: 1) How to start the new storage emulator correctly from code? 2) How to determine from code if the storage emulator is already running? 回答1: I found the solution myself. Here is my C# code. The old code used for SDK 2.2 is commented out. public static void StartStorageEmulator() { //var count =

How to get size of Azure CloudBlobContainer

喜你入骨 提交于 2019-12-21 13:29:06
问题 I'm creating a .net wrapper service for my application that utilizes Azure Blob Storage as a file store. My application creates a new CloudBlobContainer for each "account" on my system. Each account is limited to a maximum amount of storage. What is the simplest and most efficient way to query the current size (space utilization) of an Azure CloudBlobContainer`? 回答1: FYI here's the answer. Hope this helps. public static long GetSpaceUsed(string containerName) { var container =

Prevent hotlinking in Azure Blob Storage

五迷三道 提交于 2019-12-21 09:25:11
问题 One of my concerns about using Azure Blob Storage is hotlinking. It looks like a good idea to put static content (images, videos, audio, large JS and CSS files, etc..) in a public container, but then nothing stops other websites to link this content and use it in their websites. Therefore, some webmasters using my content in their sites, would cost me money. A common protection for hotlinking is to filter by the Referer HTTP header. How can this be accomplished in Microsoft Azure Blob Storage

Azure Storage Emulator store data on specific path

浪尽此生 提交于 2019-12-21 09:13:41
问题 At my current PC setup I have an SSD and a normal hard drive installed. The SSD only has a capacity of 120GB and since I'm developing a large application which stores allot of files in azure blob storage I whish to specify to which hard drive the microsoft azure storage emulator has to store my files. I am using the latest storage emulator (3.0). Thx 回答1: Storage emulator keeps this setting in a file called WAStorageEmulator.5.2.config which can be found in C:\Users\{Your Current User Name}

TableQuery<T> from Azure TableStorage that filters on PartitionKey

陌路散爱 提交于 2019-12-21 07:13:22
问题 I'm trying to abstract geting all entities from a Table by partitionKey, like so: public List<T> GetEntities<T>(string partitionKey, T entity) where T : TableEntity { try { var tableClient = _account.CreateCloudTableClient(); var table = tableClient.GetTableReference(entity.GetType().Name.ToLower()); var exQuery = new TableQuery<T>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey)); var results = table.ExecuteQuery(exQuery).Select(ent => (T) ent)