mirror of
https://github.com/bitwarden/server.git
synced 2025-04-09 07:08:15 -05:00
MultiplartSectionBody streams have 0 length until read. (#1196)
This commit is contained in:
parent
7d5b835a79
commit
a83cbf965e
@ -222,10 +222,11 @@ namespace Bit.Core.Services
|
|||||||
AttachmentId = attachmentId,
|
AttachmentId = attachmentId,
|
||||||
FileName = fileName,
|
FileName = fileName,
|
||||||
Key = key,
|
Key = key,
|
||||||
Size = stream.Length
|
|
||||||
};
|
};
|
||||||
|
|
||||||
await _attachmentStorageService.UploadNewAttachmentAsync(stream, cipher, data);
|
await _attachmentStorageService.UploadNewAttachmentAsync(stream, cipher, data);
|
||||||
|
// Must read stream length after it has been saved, otherwise it's 0
|
||||||
|
data.Size = stream.Length;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user