azure-storage-blobs

Avoid over-writing blobs AZURE

与世无争的帅哥 提交于 2019-12-11 13:38:11
问题 if i upload a file on azure blob in the same container where the file is existing already, it is over-writing the file, how to avoid overwriting the same? below i am mentioning the scenario... step1 - upload file "abc.jpg" on azure in container called say "filecontainer" step2 - once it gets uploaded, try uploading some different file with the same name to the same container Output - it will overwrite existing file with the latest uploaded My Requirement - i want to avoid this overwrite, as

ValueError: Cannot serialize: <myproject.storage.AzureStorage object at 0x7f85185e66d0>

穿精又带淫゛_ 提交于 2019-12-11 13:36:16
问题 I am trying to use AzureStorage to for connecting azure storage with django 1.7 app . models.py from django.db import models from myproject.storage import AzureStorage class MyModel(models.Model): my_file = models.FileField(upload_to="files", storage=AzureStorage(container="media")) my_image = models.ImageField(upload_to="images", storage=AzureStorage(container="media")) But when I try to makemigrations I am getting : ValueError: Cannot serialize: <myproject.storage.AzureStorage object at

Downloading a file from Azure Storage to client using Angular2 with .NET Web Api 2

醉酒当歌 提交于 2019-12-11 13:27:02
问题 I am trying to download a 1GB file from blob storage into the client. I used before Memory Stream and I get OutOfMemory exception. now I am trying to open a read stream from the blob and send it directly to the client. [HttpGet] [ResponseType(typeof(HttpResponseMessage))] public async Task<HttpResponseMessage> DownloadAsync(string file) { HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); var stream = await blob.OpenReadAsync("container", file); result.Content = new

Azure Storage Blob: set CORS on the blobs level?

我们两清 提交于 2019-12-11 13:09:28
问题 Currently, we have set CORS for the whole container with: azure storage cors set --blob static --cors '[{"AllowedOrigins":"*","AllowedMethods":"GET","MaxAgeInSeconds":"86400"}]' Is there any possibility to set rule directly and separately for each blob in that container? E.g. - for static/images/pic.png set "AllowedOrigins":"*" but for static/css/style.css - set "AllowedOrigins":"google.com" ? 回答1: Is there any possibility to set rule directly and separately for each blob in that container?

best way to upload uint8_t array to azure blob storage with wastorage in c++

十年热恋 提交于 2019-12-11 12:47:56
问题 I would like to upload a uint8_t array to azure storage using the azure storage SDK. I m struggling to construct the input stream from the array, I managed to get something that compile by using a std::vector but that require an extra copy of the array. Do you think of a better way? void upload(azure::storage::cloud_blob_container container, const wchar_t* blobName, const uint8_t * data, size_t dataLength) { std::vector<uint8_t> bytes(dataLength, (const unsigned char)data); concurrency:

Get-AzureBlobContent throwing error when run from Azure Automation account

谁说我不能喝 提交于 2019-12-11 11:59:23
问题 I am receiving a failure while trying to download blob (JSON file) from Azure storage account from my Azure Automation account. It looks like an authorization issue. This works on my local laptop, but does not work on Azure Automation Account. Does not work even if I make the container "public" I have assigned OWNER privileges for the Automation accounts's service principle on the Resource Group (Automation account + Storage account stay in this RG) and specifically on the Storage Account as

How to access texture/models from cloud/WEB at run time in android app using Unity 3D?

瘦欲@ 提交于 2019-12-11 11:22:56
问题 I have been trying to download and load the texture or other models from a WEB at run time by using WWW class. The app works well on Unity Editor but when I deploy it on android device it doesn't load/download the texture. Please somebody guide me. I have used the following code in script. void Start() { StartCoroutine(loadMovie()); } IEnumerator loadTexture() { WWW www = new WWW("http://images.earthcam.com/ec_metros/ourcams/fridays.jpg"); yield return www; // Debug.Log(www.movie.duration + "

Web Role local storage URI

拜拜、爱过 提交于 2019-12-11 10:32:46
问题 I have a local storage folder, called TempStore , set up on my Web Role instances. Is it possible to expose files as a URI from my local storage? E.g: http://myapplication.cloudapp.net/TempStore/helloworld.jpg I understand that I could use blobs for this, but I would prefer to use local storage in this case. 回答1: There is. However I really do not understand the reason for doing this? The only reason I see is some misunderstanding or not fully understanding the capabilities of the Windows

Unable to read readableStreamBody from downloaded blob

て烟熏妆下的殇ゞ 提交于 2019-12-11 10:18:02
问题 I can I check the internal buffer to see if my text data is present? Am I using node.js' Stream.read() correctly? I have a text file as a blob stored on azure-storage. When I download the blob I get readable stream as well as info about the blob. The return data has a contentLength of 11 which is correct. I am unable to read the steam. It always returns null. The node.js docs say, The readable.read() method pulls some data out of the internal buffer and returns it. If no data available to be

How to download and read files from azure blob container

戏子无情 提交于 2019-12-11 10:12:56
问题 I have a large number of files which are migrated from a premise database to azure blob. what I want is to verify whether those files are successfully migrated or not. Therefore I want to check all the files from azure blob. With their name, size, ... And if the size is < 0 or if it is not downloaded, then I have to report that as corrupted. Can I read all files from azure? And how can I check their size and whether they are downloaded or not? I have tried the code below: private const string