mirror of
https://github.com/bitwarden/server.git
synced 2025-04-11 16:18:14 -05:00
set filename with ContentDisposition
This commit is contained in:
parent
f60d6d92f8
commit
dc3e083bf0
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user