From 3cbd367b39565aa17e9bb80ae34b71de26d5abd2 Mon Sep 17 00:00:00 2001 From: ruri Date: Sat, 15 Jun 2019 14:26:57 +0200 Subject: [PATCH] Fixed translation of FILECONTENT to LS. --- RuriLib/Blocks/BlockRequest.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/RuriLib/Blocks/BlockRequest.cs b/RuriLib/Blocks/BlockRequest.cs index 18931ac..f46d2ad 100644 --- a/RuriLib/Blocks/BlockRequest.cs +++ b/RuriLib/Blocks/BlockRequest.cs @@ -292,8 +292,16 @@ namespace RuriLib { writer .Indent() - .Token($"{c.Type.ToString().ToUpper()}CONTENT") - .Literal($"{c.Name}: {c.Value}"); + .Token($"{c.Type.ToString().ToUpper()}CONTENT"); + + if (c.Type == MultipartContentType.String) + { + writer.Literal($"{c.Name}: {c.Value}"); + } + else if (c.Type == MultipartContentType.File) + { + writer.Literal($"{c.Name}: {c.Value}: {c.ContentType}"); + } } if (!writer.CheckDefault(MultipartBoundary, "MultipartBoundary")) {