1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-28 17:18:23 +01:00

Fix Content Type for file upload (#2031)

This commit is contained in:
manofthepeace 2022-08-26 09:58:54 -04:00 committed by GitHub
parent cdd9a5ff4d
commit 673ba9f3cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,7 @@
using System; using System;
using System.Net.Http; using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Threading.Tasks; using System.Threading.Tasks;
using Bit.Core.Models.Domain; using Bit.Core.Models.Domain;
@ -18,7 +20,7 @@ namespace Bit.Core.Services
{ {
var fd = new MultipartFormDataContent($"--BWMobileFormBoundary{DateTime.UtcNow.Ticks}") 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); await apiCall(fd);