From b96992d7f0ad24dd3de991f25d6814d8a54ff6a5 Mon Sep 17 00:00:00 2001 From: uwaa Date: Thu, 19 Dec 2024 07:31:09 +0000 Subject: [PATCH] pleroma: nitpick --- Pleroma/Pleroma.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Pleroma/Pleroma.cs b/Pleroma/Pleroma.cs index cb8fb65..f18ddae 100644 --- a/Pleroma/Pleroma.cs +++ b/Pleroma/Pleroma.cs @@ -334,11 +334,11 @@ public class Pleroma FileName = $"\"{Random.Shared.NextInt64()}\"", }; - MultipartFormDataContent form = new MultipartFormDataContent(); - form.Add(content); - - HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, "/api/v1/media"); - req.Content = form; + MultipartFormDataContent form = [content]; + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, "/api/v1/media") + { + Content = form + }; return (await Retry(req))!; }