Fixed translation of FILECONTENT to LS.

This commit is contained in:
ruri
2019-06-15 14:26:57 +02:00
parent fa9ed7850b
commit 3cbd367b39
+10 -2
View File
@@ -292,8 +292,16 @@ namespace RuriLib
{ {
writer writer
.Indent() .Indent()
.Token($"{c.Type.ToString().ToUpper()}CONTENT") .Token($"{c.Type.ToString().ToUpper()}CONTENT");
.Literal($"{c.Name}: {c.Value}");
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")) if (!writer.CheckDefault(MultipartBoundary, "MultipartBoundary"))
{ {