azure-storage-blobs

Connecting Azure Blob with Azure Website

安稳与你 提交于 2019-12-03 12:25:40
问题 I'm trying to connect an Azure website to an Azure blob (where I intend to host some files in a container and then grab them from my website). I started out with this tutorial: http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-get-started/ I deployed my website, and then started following this tutorial: http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/#setup-connection-string Since I was using an Azure website, I added the

Read file from Azure blob storage

心已入冬 提交于 2019-12-03 12:16:30
问题 I want to read a PDF file bytes from azure storage, for that I have a file path. https://hostedPath/pdf/1001_12_Jun_2012_18_39_05_594.pdf So it possible to read content from blob storage by directly passing its Path name? Also I am using c#. 回答1: As long as the blob is public , you can absolutely pass the blob url. For instance, you can embed it in an html image or link: <a href="https://myaccount.blob.core.windows.net/pdf/1001_12_Jun_2012_18_39_05_594.pdf">click here</a> By default, blob

Why upload to Azure blob so slow?

江枫思渺然 提交于 2019-12-03 11:31:26
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[] buffer, int offset, int count) { var additionalOffset = 0; var bytesToWriteTotal = count; List<Task> list =

how to get blob-URL after file upload in azure

让人想犯罪 __ 提交于 2019-12-03 09:24:36
I'm trying to connect web and worker role. So i have a page where user can upload video files. Files are large so i can't use the query to send files. That's why i'm trying to upload them into the Blob Storage and then send the url by the query. But i don't know how to get this url. Can anyone help me? Gaurav Mantri Assuming you're uploading the blobs into blob storage using .Net storage client library by creating an instance of CloudBlockBlob , you can get the URL of the blob by reading Uri property of the blob. static void BlobUrl() { var account = new CloudStorageAccount(new

Azure Storage CloudBlob.Properties are not initialized when using GetBlobReference()

最后都变了- 提交于 2019-12-03 06:12:36
I'm trying to get some information about Azure blob (last modified UTC date time). This information is stored CloudBlob.Properties.LastModifiedUtc property. If I use method GetBlobReference() or GetBlockBlobReference(), the Properties of the blob are not initialized (LastModifiedUtc is DateTime.MinDate). If I use ListBlobs() the Properties are initialized correctly (LastModifiedUtc has correct value). Am I doing something wrong when using GetBlobReference function? Is there some way how to get CloudBlob instance just for one specific blob? I know I can missue ListBlobs() and filter just the

Upload to Azure Blob Storage with Shared Access Key

泄露秘密 提交于 2019-12-03 05:59:40
问题 UPD: Here is my implemented solution to this problem I'm trying to upload to Azure blob storage via Azure.Storage library (not REST API) and authenticating via Shared Access Key. I have seen this blog post, but the API has changed since the post and now I can't get the same result. Here is what I have: var blobClient = new CloudBlobClient(new Uri(blobWithSas.BaseUri), new StorageCredentials(blobWithSas.Sas)); // here I receive 404 error var blob = blobClient.GetBlobReferenceFromServer(new Uri

Azure storage block blob upload from android example

本秂侑毒 提交于 2019-12-03 05:01:59
I am using the following code from an android application to upload a blob to Azure Blob Storage. Note: the sasUrl parameter below is a signed url acquired from my web service : // upload file to azure blob storage private static Boolean upload(String sasUrl, String filePath, String mimeType) { try { // Get the file data File file = new File(filePath); if (!file.exists()) { return false; } String absoluteFilePath = file.getAbsolutePath(); FileInputStream fis = new FileInputStream(absoluteFilePath); int bytesRead = 0; ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] b = new byte

Getting started with Azure storage: Blobs vs Tables vs SQL Azure

邮差的信 提交于 2019-12-03 04:23:11
It's quite a topic, blobs vs tables vs SQL , and despite all I read so far I still can't find some proper reasoning on what to use when. We have a multi-tenant SaaS web-application which we are about to move to Azure. We use an SQL Server 2008 database. We store documents and log information that belongs to the documents. Kinda like dropbox does. The forums state that you better use Azure Tables when you are considering "large" objects. We typically store hundreds of documents per user where the size of the documents vary from 5kb to 30mb where the vast majority will be around 1MB? Are there

Using Azure CDN with Shared Access Signatures

一笑奈何 提交于 2019-12-03 03:21:54
Im trying to incorporate Azure to store the majority of my files for an application. I want to upload these files to a private container and private blob in azure, and have those uploads copied through the Azure CDN to all of the other nodes (still as private containers and blobs). I then want my application to make a request to a stored blob, and give me the shared access signature link to the blob for a period of time. However, I want the link generated to be given for the closest datacenter to the user. I will have the SAS be generated each time a blob is needed, but I need to be able to

Batch Uploading Huge Sets of Images to Azure Blob Storage

北城余情 提交于 2019-12-03 03:07:07
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 using(MemoryStream ms = new MemoryStream()) { pic.Save(ms, format); ms.Position = 0; //create the blob,