diff --git a/src/Core/Services/Implementations/AzureAttachmentStorageService.cs b/src/Core/Services/Implementations/AzureAttachmentStorageService.cs index 4440bb4b80..0d535a5e4c 100644 --- a/src/Core/Services/Implementations/AzureAttachmentStorageService.cs +++ b/src/Core/Services/Implementations/AzureAttachmentStorageService.cs @@ -34,7 +34,7 @@ namespace Bit.Core.Services { blob.Metadata.Add("organizationId", cipher.OrganizationId.Value.ToString()); } - blob.Properties.ContentDisposition = "attachment"; + blob.Properties.ContentDisposition = $"attachment; filename=\"{attachmentId}\""; await blob.UploadFromStreamAsync(stream); } @@ -44,7 +44,8 @@ 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"; + blob.Properties.ContentDisposition = $"attachment; filename=\"{attachmentId}\""; + await blob.SetPropertiesAsync(); await blob.UploadFromStreamAsync(stream); }