From 16a4f6d932243b52dfb6137d52637307c2ecf4b9 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 5 Nov 2018 08:27:49 -0500 Subject: [PATCH] ContentDisposition=attachment for azure blobs --- .../Services/Implementations/AzureAttachmentStorageService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Core/Services/Implementations/AzureAttachmentStorageService.cs b/src/Core/Services/Implementations/AzureAttachmentStorageService.cs index f5843c9911..4440bb4b80 100644 --- a/src/Core/Services/Implementations/AzureAttachmentStorageService.cs +++ b/src/Core/Services/Implementations/AzureAttachmentStorageService.cs @@ -34,6 +34,7 @@ namespace Bit.Core.Services { blob.Metadata.Add("organizationId", cipher.OrganizationId.Value.ToString()); } + blob.Properties.ContentDisposition = "attachment"; await blob.UploadFromStreamAsync(stream); } @@ -43,6 +44,7 @@ namespace Bit.Core.Services var blob = _attachmentsContainer.GetBlockBlobReference($"temp/{cipherId}/{organizationId}/{attachmentId}"); blob.Metadata.Add("cipherId", cipherId.ToString()); blob.Metadata.Add("organizationId", organizationId.ToString()); + blob.Properties.ContentDisposition = "attachment"; await blob.UploadFromStreamAsync(stream); }