From 673ba9f3ccdfc863893a834112d4777e3beb1704 Mon Sep 17 00:00:00 2001 From: manofthepeace <13215031+manofthepeace@users.noreply.github.com> Date: Fri, 26 Aug 2022 09:58:54 -0400 Subject: [PATCH] Fix Content Type for file upload (#2031) --- src/Core/Services/BitwardenFileUploadService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/BitwardenFileUploadService.cs b/src/Core/Services/BitwardenFileUploadService.cs index 88295c0a9..bb0c29073 100644 --- a/src/Core/Services/BitwardenFileUploadService.cs +++ b/src/Core/Services/BitwardenFileUploadService.cs @@ -1,5 +1,7 @@ using System; using System.Net.Http; +using System.Net.Http.Headers; +using System.Net.Mime; using System.Threading.Tasks; using Bit.Core.Models.Domain; @@ -18,7 +20,7 @@ namespace Bit.Core.Services { var fd = new MultipartFormDataContent($"--BWMobileFormBoundary{DateTime.UtcNow.Ticks}") { - { new ByteArrayContent(encryptedFileData.Buffer), "data", encryptedFileName } + { new ByteArrayContent(encryptedFileData.Buffer) { Headers = { ContentType = new MediaTypeHeaderValue(MediaTypeNames.Application.Octet) } }, "data", encryptedFileName } }; await apiCall(fd);