azure-storage-blobs

Azure Architecture Design

非 Y 不嫁゛ 提交于 2019-12-10 20:02:27
问题 I'm new to Azure, and a little confused about blob storage. I have a need for clients to access via FTP / SFTP to push and pull files (XML, CSV, EDI, etc). The pushed files are read in by a .net application and written to a database. As I understand, we would use a VM role to create a FTP / SFTP server, a worker role to execute the .net code, SQL Storage for the DB and Blob storage for the files. Am I correct in this assumption first, and second can a VM role attach a storage blob for writing

How to use StartCopyFromBlob between different accounts?

我的梦境 提交于 2019-12-10 19:36:46
问题 I am using this code to copy blobs from one account to another... but it throws an exception. var srcAccount = CloudStorageAccount.Parse("connection string 1"); var dstAccount = CloudStorageAccount.Parse("connection string 2"); var srcBlobClient = srcAccount.CreateCloudBlobClient(); var dstBlobClient = dstAccount.CreateCloudBlobClient(); foreach (var srcCloudBlobContainer in srcBlobClient.ListContainers()) { var dstCloudBlobContainer = dstBlobClient .GetContainerReference

Upload file into Blob Azure

你离开我真会死。 提交于 2019-12-10 18:38:41
问题 I'm trying to upload files into blob Azure from an MVC app, I'm following this tutorial, and I'm stuck in this snippet: using (var fileStream = System.IO.File.OpenRead(@"path\myfile")) { blockBlob.UploadFromStream(fileStream); } How to make @"path\myfile" dynamic?? How to retrieve the real path of my file to put it in there? I accept any other suggestion too to upload to blob :) UPDATE As suggested I added the code inside my View: @model RiPSShared.Models.RiPSModels.AgencyNote <h2>PostFile<

Azure Blob vs File vs Disk storage

霸气de小男生 提交于 2019-12-10 18:21:44
问题 Quick question. I've been reading tons of information about the azure blob/file/disk storage options and I have a such simple storage requirement that I'm confused as to what would be the best choice. Most of the information I'm reading is going totally over my head. I was hoping someone might be able to narrow down the field of view to a more reasonable sized set of pros/cons. My situation is as follows: I am building an API that is doing image processing. To put it simply, the user makes a

How to get a list of existing directories in Azure Blob Storage container using c#?

て烟熏妆下的殇ゞ 提交于 2019-12-10 14:05:41
问题 I have a console app written using C# on the top of Core .NET 2.2 framework. I am trying to the C# library to get a list of all directories inside my container. It is my understanding that Azure Blob Storage does not really have directories. Instead, it creates virtual names that the blobs look like a folder inside a container within browsers like Azure Blob Explorer I store my files using the following code CloudBlockBlob blockBlob = container.GetBlockBlobReference("foldername/filename.jpg")

Increase Azure blob block upload limit from 32 MB

淺唱寂寞╮ 提交于 2019-12-10 11:35:27
问题 I am trying to upload a contents to azure blob and the size is over 32MB. The c# code snippet below: CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(blobName); blob.UploadFromByteArray(contents, 0, contents.Length, AccessCondition.GenerateIfNotExistsCondition(), options:writeOptions); Everytime the blob is over 32MB, the above raises an exception: Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll Additional information: The

Uploading DataTable to Azure blob storage

喜夏-厌秋 提交于 2019-12-10 11:17:20
问题 I am trying to serialize a DataTable to XML and then upload it to Azure blob storage. The below code works, but seems clunky and memory hungry. Is there a better way to do this? I'm especially referring to the fact that I am dumping a memory stream to a byte array and then creating a new memory stream from it. var container = blobClient.GetContainerReference("container"); var blockBlob = container.GetBlockBlobReference("blob"); byte[] blobBytes; using (var writeStream = new MemoryStream()) {

Converting Azure “classic” storage accounts

依然范特西╮ 提交于 2019-12-10 11:04:03
问题 I've created some Azure Machine Learning Workspaces and associated them with "classic" storage accounts; but would like to have them associated with "not-classic" (or whatever the term is) storage accounts. Is there a way to convert the storage accounts from "classic", or to change the storage account associated with a Machine Learning Workspace? 回答1: As of today, there's no automatic way of converting a "Classic" storage account into "Azure Resource Manager (ARM)" storage account. Today, you

HttpResponseMessage Redirect to Private Azure Blob Storage

♀尐吖头ヾ 提交于 2019-12-10 10:54:05
问题 Developing an API using asp.net Is it possible to redirect a user to a private azure blob storage? Can i do this using SAS keys or the azure blob SDK? For example I want to do something like this: var response = Request.CreateResponse(HttpStatusCode.Moved); response.Headers.Location = new Uri(bloburl); return response; Is it possible to access a private blob by putting a key in the URL? Obviously i dont want to put the master key though. 回答1: Is it possible to redirect a user to a private

Azure Function Blob Trigger CloudBlockBlob binding

烈酒焚心 提交于 2019-12-10 10:13:08
问题 I have the following Azure function triggered when a file is uploaded to Blob Storage [FunctionName("ImageAnalysis")] public static async void Run( [BlobTrigger("imageanalysis/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob, string name, TraceWriter log) { log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes"); } I want to process the Blob that has been uploaded so ideally I would like it as a CloudBlockBlob instead of a Stream. Then I