Skip to content

Commit e50ec59

Browse files
JohannesLootkirre-bylund
authored andcommitted
Added error message when file has a size of 0(null)
1 parent 28f6bc7 commit e50ec59

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Runtime/Client/LootLockerServerRequest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,11 @@ public static void UploadFile(string endPoint, LootLockerHTTPMethod httpMethod,
426426
return;
427427
}
428428
Dictionary<string, string> headers = new Dictionary<string, string>();
429-
429+
if (file.Length == 0)
430+
{
431+
LootLockerLogger.GetForLogLevel(LootLockerLogger.LogLevel.Error)("File content is empty, not allowed.");
432+
return;
433+
}
430434
if (useAuthToken)
431435
{
432436
headers = new Dictionary<string, string>();

0 commit comments

Comments
 (0)