azure-storage

How do I convert readable image stream into base64 without saving locally

自作多情 提交于 2019-12-24 08:49:19
问题 I want to convert an image in azure to base64. How can I achieve this using azure-storage package? this.blobService.getBlobProperties( 'container', path, (err, properties, status)=> { if (err) { res.send(502, "Error fetching file: %s", err.message); } else if (!status.isSuccessful) { res.send(502, "The file %s does not exist", fileName) } else { res.header('Content-Type', properties['contentType']); this.blobService.createReadStream('container', path,(error,response)=>{ }).pipe(res); } });

Understanding / removing a file lock on Azure File Service

天涯浪子 提交于 2019-12-24 07:04:33
问题 I'm working on an application that used to share common files to blob storage (i.e. Worker Role A would update those files and Worker Role B would read those). As this application is non critical we recently transitioned to Azure File Service share, even though it's still a preview. It was working just fine until recently when a file lock wouldn't be released on the share, even after trying to delete all the instances that could possibly have a handle on those files. Always the same message

Can't programmatically set permissions to blob container in Azure Storage

こ雲淡風輕ζ 提交于 2019-12-24 03:24:41
问题 After creating a blob container with CreateIfNotExists() , I immediately call SetPermissions() to allow users public access to the blobs in the container, but not to the container itself. Like so: CloudBlobContainer pdfContainer = blobClient.GetContainerReference(ContainerName.PDFs); if (pdfContainer.CreateIfNotExists()) pdfContainer.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob }); The container is created successfully, but when I log in to

make a backup for azure database

断了今生、忘了曾经 提交于 2019-12-24 03:15:01
问题 I need to make a backup to my azure database, I'm trying with this command: "C:\Program Files\Microsoft SQL Server\120\DAC\bin\SqlPackage.exe" /Action:Export /SourceServerName:"tcp:MyDataServer.database.windows.net,1433" /SourceDatabaseName:MyDatabase /SourceUser:MyUser /SourcePassword:MyPass /TargetFile:C:\backups\backup.bacpac but it seems that the format that downloads it is "bacpac" and I need it to be ".bak", I tried to change the extension but says: "The TargetFile argument must refer

Windows Azure Shared Access Signature always gives: Forbidden 403

岁酱吖の 提交于 2019-12-24 03:15:01
问题 I am trying to get a shared access signature for a single blob and then download the blob using the REST api. However, I always get a forbidden 403 error message. Both on storage emulator and the cloud. Here is my code: CloudStorageAccount storageAccount = CloudStorageAccount.Parse("myConnectionStringHere..."); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference("containerName"); CloudBlob blob = container

How to convert from Azure Append Blob to Azure Block Blob

时间秒杀一切 提交于 2019-12-24 03:03:41
问题 Is their any any to convert from Append Blob to Block Blob . Regards C 回答1: Is their any any to convert from Append Blob to Block Blob . Once the blob has been created, its type cannot be changed, and it can be updated only by using operations appropriate for that blob type, i.e., writing a block or list of blocks to a block blob, appending blocks to a append blob, and writing pages to a page blob. More information please refer to this link: Understanding Block Blobs, Append Blobs, and Page

How to convert from Azure Append Blob to Azure Block Blob

允我心安 提交于 2019-12-24 03:03:20
问题 Is their any any to convert from Append Blob to Block Blob . Regards C 回答1: Is their any any to convert from Append Blob to Block Blob . Once the blob has been created, its type cannot be changed, and it can be updated only by using operations appropriate for that blob type, i.e., writing a block or list of blocks to a block blob, appending blocks to a append blob, and writing pages to a page blob. More information please refer to this link: Understanding Block Blobs, Append Blobs, and Page

how to write azure web role - worker role schedule task?

耗尽温柔 提交于 2019-12-24 02:55:13
问题 I am reaching a conflict in my azure project, I'm trying to seclude task : on every 16th of the month of .xml file form individual web site. In my project I have one web role and one worker role, I trying to seclude on every 16th of the month that the web role will create a message(connect to the site and download the .xml file), insert it to the queue storage, the worker role gets the message process it and delete the message. Suggestion anyone?? 回答1: Have you taken a look at this post -

How to list all virtual directories and subdirectories using Azure Storage Client Library for .NET (BLOBS)

泪湿孤枕 提交于 2019-12-24 00:59:28
问题 How to list ALL directories AND subdirectories in a blob container? This is what I have so far: public List<CloudBlobDirectory> Folders { get; set; } public List<CloudBlobDirectory> GetAllFoldersAndSubFoldersFromBlobStorageContainer() { CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient

Delivering and using an Azure REST-API SharedKey for Blob Upload

对着背影说爱祢 提交于 2019-12-24 00:43:21
问题 We currently use the REST API (based on microsoft samples) to upload blobs blockwise from a .NET client profile machine. The REST API examples use the Azure storage account name and access key directly to construct the SharedKey entry in the request header. For production code, we'll need to calculate the SharedKey on our server, and deliver it for the client to use during the session. Examples of SharedKey creation for blobs provide me with a Url plus query string that contains the access