Skip to content

Commit

Permalink
Use StreamContent for DemoUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
TheR00st3r committed Nov 17, 2023
1 parent 9088f08 commit d5fdbed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions PugSharp.ApiStats/DemoUploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ public async Task UploadDemoAsync(string? demoFile, CancellationToken cancellati
await using (demoFileStream.ConfigureAwait(false))
{
using var fileStreamContent = new StreamContent(demoFileStream);
using var formData = new MultipartFormDataContent
{
fileStreamContent,
};

var request = new HttpRequestMessage(HttpMethod.Post, string.Empty)
{
Content = formData,
Content = fileStreamContent,
};

request.Headers.Add("PugSharp-DemoName", Path.GetFileName(demoFile));
Expand Down

0 comments on commit d5fdbed

Please sign in to comment.