Skip to content

Commit e09dcc5

Browse files
committed
fix json parsing error on upload
Unexpected character encountered while parsing value: �. Path '', line 0, position 0. at Sleet.JsonUtility.<LoadJsonAsync>d__13.MoveNext() in Sleet\src\SleetLib\Utility\JsonUtility.cs:line 181
1 parent 52ac190 commit e09dcc5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/SleetLib/FileSystem/AmazonS3File.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ protected override async Task CopyToSource(ILogger log, CancellationToken token)
115115
{
116116
contentType = "image/svg+xml";
117117
}
118+
else if (absoluteUri.AbsoluteUri.EndsWith("/icon"))
119+
{
120+
contentType = "image/png";
121+
}
122+
else if (absoluteUri.AbsoluteUri.EndsWith("/readme"))
123+
{
124+
contentType = "text/markdown";
125+
}
118126
else if (key.EndsWith(".json", StringComparison.Ordinal)
119127
|| await JsonUtility.IsJsonAsync(LocalCacheFile.FullName))
120128
{
@@ -131,14 +139,6 @@ protected override async Task CopyToSource(ILogger log, CancellationToken token)
131139
{
132140
contentType = "application/octet-stream";
133141
}
134-
else if (absoluteUri.AbsoluteUri.EndsWith("/icon"))
135-
{
136-
contentType = "image/png";
137-
}
138-
else if (absoluteUri.AbsoluteUri.EndsWith("/readme"))
139-
{
140-
contentType = "text/markdown";
141-
}
142142
else
143143
{
144144
log.LogWarning($"Unknown file type: {absoluteUri}");

0 commit comments

Comments
 (0)