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))!; }